File tree Expand file tree Collapse file tree 5 files changed +13
-21
lines changed
Expand file tree Collapse file tree 5 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,6 @@ if(WIN32)
2828 endif ()
2929endif ()
3030
31- if (NOT BUILD_SHARED_LIBS )
32- target_compile_definitions (CppUnit
33- PUBLIC
34- POCO_STATIC
35- )
36- elseif (MINGW)
37- target_compile_definitions (CppUnit
38- PUBLIC
39- _DLL )
31+ if (BUILD_SHARED_LIBS AND MINGW)
32+ target_compile_definitions (CppUnit PUBLIC _DLL )
4033endif ()
Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G})
3939file (GLOB_RECURSE HDRS_G "include/*.h" )
4040POCO_HEADERS_AUTO ( SRCS ${HDRS_G} )
4141
42- if (NOT POCO_STATIC)
43- add_compile_definitions (THREADSAFE )
44- endif (NOT POCO_STATIC )
45-
4642add_library ( "${LIBNAME} " ${LIB_MODE} ${SRCS} )
4743add_library ( "${POCO_LIBNAME} " ALIAS "${LIBNAME} " )
4844set_target_properties ( "${LIBNAME} "
@@ -61,6 +57,10 @@ target_include_directories( "${LIBNAME}"
6157 )
6258target_compile_definitions ("${LIBNAME} " PUBLIC ${LIB_MODE_DEFINITIONS} )
6359
60+ if (BUILD_SHARED_LIBS )
61+ target_compile_definitions (${LIBNAME} PUBLIC THREADSAFE )
62+ endif ()
63+
6464POCO_INSTALL ("${LIBNAME} " )
6565POCO_GENERATE_PACKAGE ("${LIBNAME} " )
6666
Original file line number Diff line number Diff line change @@ -128,13 +128,6 @@ if(NOT DISABLE_CPP14 AND CMAKE_VERSION VERSION_GREATER "3.8")
128128 target_compile_features (Foundation PUBLIC cxx_std_14 )
129129endif ()
130130
131- if (NOT BUILD_SHARED_LIBS )
132- target_compile_definitions (Foundation
133- PUBLIC
134- POCO_STATIC
135- )
136- endif ()
137-
138131if (WIN32 )
139132 target_compile_definitions (Foundation PUBLIC POCO_OS_FAMILY_WINDOWS UNICODE _UNICODE )
140133 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # POCO_STATIC=1 - for static build
3+ # BUILD_SHARED_LIBS=OFF - for static build
44# POCO_UNBUNDLED - for no built-in version of libs
55# CMAKE_INSTALL_PREFIX=path - for install path
66
Original file line number Diff line number Diff line change 2222# - PocoXmdd.lib for /MD debug build
2323# - PocoXmtd.lib for /MT debug build
2424
25+ if (BUILD_SHARED_LIBS )
26+ add_compile_definitions (POCO_DLL )
27+ else ()
28+ add_compile_definitions (POCO_STATIC )
29+ endif ()
30+
2531if (MSVC )
2632 if (POCO_MT)
2733 set (CompilerFlags
You can’t perform that action at this time.
0 commit comments