mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-21 14:42:51 +01:00
fix(cmake): Add back missing compiler definitions for static_build in the generated CMake files
This commit is contained in:
parent
b9af97ceb3
commit
f155ba3957
@ -28,6 +28,8 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS AND MINGW)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(CppUnit PUBLIC POCO_STATIC)
|
||||
elseif (MINGW)
|
||||
target_compile_definitions(CppUnit PUBLIC _DLL)
|
||||
endif()
|
||||
|
@ -128,6 +128,12 @@ if(NOT DISABLE_CPP14 AND CMAKE_VERSION VERSION_GREATER "3.8")
|
||||
target_compile_features(Foundation PUBLIC cxx_std_14)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
# The define must be set here to be included in the generated CMake files
|
||||
# and properly detect build in the installed files.
|
||||
target_compile_definitions(Foundation PUBLIC POCO_STATIC)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_OS_FAMILY_WINDOWS UNICODE _UNICODE)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
Loading…
x
Reference in New Issue
Block a user