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
4646 )
4747
4848set (PROGRAM "cmark" )
49- set (PROGRAM_SOURCES
50- ${LIBRARY_SOURCES}
51- main.c
52- )
49+ set (PROGRAM_SOURCES main.c)
5350
5451include_directories (. ${CMAKE_CURRENT_BINARY_DIR} )
5552
@@ -60,9 +57,14 @@ include (GenerateExportHeader)
6057
6158add_executable (${PROGRAM} ${PROGRAM_SOURCES} )
6259
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 ()
6668
6769# Check integrity of node structure when compiled as debug:
6870set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES" )
You can’t perform that action at this time.
0 commit comments