File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import PackageDescription
11
11
// link time.
12
12
let cSettings : [ CSetting ] = [
13
13
. define( " CMARK_GFM_STATIC_DEFINE " , . when( platforms: [ . windows] ) ) ,
14
- . define( " CMARK_GFM_EXTENSIONS_STATIC_DEFINE " , . when( platforms: [ . windows] ) ) ,
15
14
]
16
15
#else
17
16
let cSettings : [ CSetting ] = [ ]
Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ endif()
44
44
45
45
if (CMARK_STATIC )
46
46
add_library (${STATICLIBRARY} STATIC ${LIBRARY_SOURCES} )
47
+ target_compile_definitions (${STATICLIBRARY} PUBLIC
48
+ CMARK_GFM_STATIC_DEFINE )
47
49
48
50
set_target_properties (${STATICLIBRARY} PROPERTIES
49
- COMPILE_FLAGS "-DCMARK_GFM_STATIC_DEFINE -DCMARK_GFM_EXTENSIONS_STATIC_DEFINE"
50
51
POSITION_INDEPENDENT_CODE ON )
51
52
52
53
if (MSVC )
Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ elseif(CMARK_STATIC)
55
55
target_link_libraries (${PROGRAM} libcmark-gfm-extensions_static libcmark-gfm_static )
56
56
endif ()
57
57
58
- # Disable the PUBLIC declarations when compiling the executable:
59
- set_target_properties (${PROGRAM} PROPERTIES
60
- COMPILE_FLAGS "-DCMARK_GFM_STATIC_DEFINE -DCMARK_GFM_EXTENSIONS_STATIC_DEFINE" )
61
-
62
58
# Check integrity of node structure when compiled as debug:
63
59
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES -DDEBUG" )
64
60
set (CMAKE_LINKER_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} " )
@@ -92,12 +88,13 @@ endif()
92
88
93
89
if (CMARK_STATIC )
94
90
add_library (${STATICLIBRARY} STATIC ${LIBRARY_SOURCES} )
91
+ target_compile_definitions (${STATICLIBRARY} PUBLIC
92
+ CMARK_GFM_STATIC_DEFINE )
95
93
target_include_directories (${LIBRARY} PUBLIC
96
94
$< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /src/include>
97
95
$< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /extensions/include> )
98
96
99
97
set_target_properties (${STATICLIBRARY} PROPERTIES
100
- COMPILE_FLAGS -DCMARK_GFM_STATIC_DEFINE
101
98
POSITION_INDEPENDENT_CODE ON )
102
99
103
100
if (MSVC )
You can’t perform that action at this time.
0 commit comments