mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 11:05:03 +02:00
trunk: split cmake debug/optimize build 2
This commit is contained in:
@@ -11,13 +11,21 @@ SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINO
|
|||||||
SET(RELEASE_NAME "Unstable-trunk")
|
SET(RELEASE_NAME "Unstable-trunk")
|
||||||
SET(PROJECT_VERSION ${COMPLETE_VERSION})
|
SET(PROJECT_VERSION ${COMPLETE_VERSION})
|
||||||
|
|
||||||
if(POCO_DEBUG)
|
#################################################################################
|
||||||
set( CMAKE_BUILD_TYPE "Debug" )
|
# Setup C/C++ compiler options
|
||||||
endif(POCO_DEBUG)
|
#################################################################################
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE MATCHES "")
|
if(NOT MSVC_IDE)
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||||
|
"Choose the type of build, options are: None Debug Release" FORCE)
|
||||||
|
endif()
|
||||||
|
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||||
endif (CMAKE_BUILD_TYPE MATCHES "")
|
endif ()
|
||||||
|
|
||||||
# http://www.cmake.org/Wiki/CMake_Useful_Variables :
|
# http://www.cmake.org/Wiki/CMake_Useful_Variables :
|
||||||
# CMAKE_BUILD_TYPE
|
# CMAKE_BUILD_TYPE
|
||||||
@@ -28,13 +36,13 @@ endif (CMAKE_BUILD_TYPE MATCHES "")
|
|||||||
# * Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
|
# * Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
|
||||||
# * RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
# * RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||||
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
message(STATUS "Debug output enabled")
|
message(STATUS "Debug output enabled")
|
||||||
set(LIB_EXT "d")
|
set(LIB_EXT "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||||
else (CMAKE_BUILD_TYPE MATCHES "Debug")
|
else ()
|
||||||
message(STATUS "Optimized output enabled")
|
message(STATUS "Optimized output enabled")
|
||||||
set(LIB_EXT "r")
|
set(LIB_EXT "" CACHE STRING "Set debug library postfix" FORCE)
|
||||||
endif (CMAKE_BUILD_TYPE MATCHES "Debug")
|
endif ()
|
||||||
|
|
||||||
option(ENABLE_TESTS
|
option(ENABLE_TESTS
|
||||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||||
@@ -123,6 +131,7 @@ add_subdirectory(Util)
|
|||||||
add_subdirectory(Net)
|
add_subdirectory(Net)
|
||||||
#add_subdirectory(Web)
|
#add_subdirectory(Web)
|
||||||
|
|
||||||
|
# OPENSSL_SSL_LIBRARY
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
add_subdirectory(NetSSL_OpenSSL)
|
add_subdirectory(NetSSL_OpenSSL)
|
||||||
add_subdirectory(Crypto)
|
add_subdirectory(Crypto)
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoCrypto")
|
set(LIBNAME "PocoCrypto")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
@@ -6,7 +7,7 @@ include_directories( include)
|
|||||||
|
|
||||||
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoNetSSL PocoNet ssl crypto)
|
target_link_libraries( ${LIBNAME} PocoNetSSL${LIB_EXT} PocoNet${LIB_EXT} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoData")
|
set(LIBNAME "PocoData")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
@@ -12,7 +13,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation )
|
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} )
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoDataMySQL")
|
set(LIBNAME "PocoDataMySQL")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
@@ -12,7 +13,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${MYSQL_LIB})
|
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT} ${MYSQL_LIB})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoDataODBC")
|
set(LIBNAME "PocoDataODBC")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
src/Binder.cpp
|
src/Binder.cpp
|
||||||
@@ -25,7 +26,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LINK_FLAGS})
|
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT} ${ODBC_LINK_FLAGS})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoDataSQLite")
|
set(LIBNAME "PocoDataSQLite")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
include_directories( include src )
|
include_directories( include src )
|
||||||
|
|
||||||
@@ -11,7 +12,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoData PocoFoundation)
|
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoNet")
|
set(LIBNAME "PocoNet")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
aux_source_directory(src BASE_SRCS)
|
aux_source_directory(src BASE_SRCS)
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation ${SYSLIBS})
|
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${SYSLIBS})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoNetSSL")
|
set(LIBNAME "PocoNetSSL")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
||||||
@@ -11,7 +12,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} ssl crypto)
|
target_link_libraries( ${LIBNAME} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoUtil")
|
set(LIBNAME "PocoUtil")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
set( BASE_SRCS
|
set( BASE_SRCS
|
||||||
src/AbstractConfiguration.cpp
|
src/AbstractConfiguration.cpp
|
||||||
@@ -46,7 +47,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoXML PocoFoundation)
|
target_link_libraries( ${LIBNAME} PocoXML${LIB_EXT} PocoFoundation${LIB_EXT})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoWebWidgets")
|
set(LIBNAME "PocoWebWidgets")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
@@ -11,7 +12,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoNet PocoUtil PocoXML PocoFoundation )
|
target_link_libraries( ${LIBNAME} PocoNet${LIB_EXT} PocoUtil${LIB_EXT} PocoXML${LIB_EXT} PocoFoundation${LIB_EXT} )
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoExtJS")
|
set(LIBNAME "PocoExtJS")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
include_directories( include src )
|
include_directories( include src )
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ set_target_properties( ${LIBNAME}
|
|||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION}
|
VERSION ${SHARED_LIBRARY_VERSION}
|
||||||
SOVERSION ${SHARED_LIBRARY_VERSION})
|
SOVERSION ${SHARED_LIBRARY_VERSION})
|
||||||
target_link_libraries( ${LIBNAME} PocoWebWidgets PocoData )
|
target_link_libraries( ${LIBNAME} PocoWebWidgets${LIB_EXT} )
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoXML")
|
set(LIBNAME "PocoXML")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation)
|
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
set(LIBNAME "PocoZip")
|
set(LIBNAME "PocoZip")
|
||||||
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoUtil PocoXML PocoFoundation)
|
target_link_libraries( ${LIBNAME} PocoUtil${LIB_EXT} PocoXML${LIB_EXT} PocoFoundation${LIB_EXT})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
Reference in New Issue
Block a user