File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,15 +14,11 @@ set(SOURCES
1414 src/format.cpp
1515)
1616
17- if (DYLIB_SHARED)
18- add_library (dylib SHARED ${SOURCES} )
19- if (WIN32 )
20- set_target_properties (dylib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
21- endif ()
22- else ()
23- add_library (dylib STATIC ${SOURCES} )
24- endif ()
17+ add_library (dylib ${SOURCES} )
2518
19+ if (BUILD_SHARED_LIBS AND WIN32 )
20+ set_target_properties (dylib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
21+ endif ()
2622
2723target_include_directories (dylib
2824 PUBLIC
@@ -79,7 +75,6 @@ install(
7975
8076option (DYLIB_BUILD_TESTS "When set to ON, build unit tests" OFF )
8177option (DYLIB_WARNING_AS_ERRORS "Treat warnings as errors" OFF )
82- option (DYLIB_SHARED "Build as shared object" ON )
8378
8479if (DYLIB_BUILD_TESTS)
8580 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR } )
@@ -132,5 +127,3 @@ if(DYLIB_BUILD_TESTS)
132127 include (GoogleTest )
133128 gtest_discover_tests (unit_tests PROPERTIES DISCOVERY_TIMEOUT 600 WORKING_DIRECTORY ${PROJECT_BINARY_DIR } )
134129endif ()
135-
136-
You can’t perform that action at this time.
0 commit comments