File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,7 @@ set(LIBRARY_SOURCES
46
46
)
47
47
48
48
set (PROGRAM "cmark" )
49
- set (PROGRAM_SOURCES
50
- ${LIBRARY_SOURCES}
51
- main.c
52
- )
49
+ set (PROGRAM_SOURCES main.c )
53
50
54
51
include_directories (. ${CMAKE_CURRENT_BINARY_DIR} )
55
52
@@ -60,9 +57,14 @@ include (GenerateExportHeader)
60
57
61
58
add_executable (${PROGRAM} ${PROGRAM_SOURCES} )
62
59
63
- # Disable the PUBLIC declarations when compiling the executable:
64
- set_target_properties (${PROGRAM} PROPERTIES
65
- COMPILE_FLAGS -DCMARK_STATIC_DEFINE )
60
+ if (CMARK_STATIC )
61
+ target_link_libraries (${PROGRAM} ${STATICLIBRARY} )
62
+ # Disable the PUBLIC declarations when compiling the executable:
63
+ set_target_properties (${PROGRAM} PROPERTIES
64
+ COMPILE_FLAGS -DCMARK_STATIC_DEFINE )
65
+ elseif (CMARK_SHARED )
66
+ target_link_libraries (${PROGRAM} ${LIBRARY} )
67
+ endif ()
66
68
67
69
# Check integrity of node structure when compiled as debug:
68
70
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES" )
You can’t perform that action at this time.
0 commit comments