mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 06:35:03 +01:00
Add SIMPLE_INSTALL macro, update FindSQL for Windows and
DefinePlatformSpecific.cmake for Cygwin. Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
parent
870cc4a648
commit
03423ddd04
@ -48,6 +48,8 @@ if(MSVC)
|
||||
else(MSVC)
|
||||
# Other compilers then MSVC don't have a static STATIC_POSTFIX at the moment
|
||||
set(STATIC_POSTFIX "" CACHE STRING "Set static library postfix" FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
endif(MSVC)
|
||||
|
||||
# Add a d postfix to the debug libraries
|
||||
@ -72,7 +74,11 @@ if(WIN32)
|
||||
add_definitions( -DUNICODE -D_UNICODE -D__LCC__) #__LCC__ define used by MySQL.h
|
||||
endif(WIN32)
|
||||
|
||||
if (UNIX AND NOT ANDROID )
|
||||
if (CYGWIN)
|
||||
add_definitions(-DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING)
|
||||
add_definitions(-D_XOPEN_SOURCE=500 -D__BSD_VISIBLE)
|
||||
else (CYGWIN)
|
||||
if (UNIX AND NOT ANDROID )
|
||||
# Standard 'must be' defines
|
||||
if (APPLE)
|
||||
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)
|
||||
@ -87,7 +93,8 @@ if (UNIX AND NOT ANDROID )
|
||||
set(SYSLIBS pthread dl rt)
|
||||
endif (QNX)
|
||||
endif (APPLE)
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
endif (CYGWIN)
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "SunOS")
|
||||
# Standard 'must be' defines
|
||||
@ -100,10 +107,6 @@ if (CMAKE_COMPILER_IS_MINGW)
|
||||
add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE)
|
||||
endif (CMAKE_COMPILER_IS_MINGW)
|
||||
|
||||
if (CYGWIN)
|
||||
# add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8)
|
||||
endif (CYGWIN)
|
||||
|
||||
# SunPro C++
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
add_definitions( -D_BSD_SOURCE -library=stlport4)
|
||||
|
@ -12,6 +12,7 @@ find_path(MYSQL_INCLUDE_DIR mysql.h
|
||||
$ENV{MYSQL_DIR}/include
|
||||
$ENV{ProgramFiles}/MySQL/*/include
|
||||
${BINDIR32}/MySQL/include
|
||||
${BINDIR32}/MySQL/*/include
|
||||
$ENV{SystemDrive}/MySQL/*/include)
|
||||
|
||||
if (WIN32)
|
||||
@ -24,13 +25,16 @@ if (WIN32)
|
||||
add_definitions(-DDBUG_OFF)
|
||||
endif (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
find_library(MYSQL_LIB NAMES mysqlclient
|
||||
find_library(MYSQL_LIB NAMES mysqlclient.lib
|
||||
PATHS
|
||||
$ENV{MYSQL_DIR}/lib/${libsuffixDist}
|
||||
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
|
||||
$ENV{MYSQL_DIR}/client/${libsuffixBuild}
|
||||
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
|
||||
${BINDIR32}/MySQL/lib
|
||||
${BINDIR32}/MySQL/*/lib/vs12
|
||||
${BINDIR32}/MySQL/*/lib/vs11
|
||||
${BINDIR32}/MySQL/*/lib/vs10
|
||||
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
|
||||
else (WIN32)
|
||||
find_library(MYSQL_LIB NAMES mysqlclient_r
|
||||
|
@ -261,6 +261,37 @@ endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# Macros for simplified installation of package not following the Poco standard as CppUnit
|
||||
#
|
||||
# SIMPLE_INSTALL - Install the given target
|
||||
# Usage: SIMPLE_INSTALL(target_name)
|
||||
# INPUT:
|
||||
# target_name the name of the target. e.g. CppUnit
|
||||
# Example: SIMPLE_INSTALL(Foundation)
|
||||
macro(SIMPLE_INSTALL target_name)
|
||||
install(
|
||||
DIRECTORY include
|
||||
DESTINATION include
|
||||
COMPONENT Devel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS "${target_name}" EXPORT "${target_name}Targets"
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
# install the targets pdb
|
||||
POCO_INSTALL_PDB(${target_name})
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
# POCO_INSTALL_PDB - Install the given target's companion pdb file (if present)
|
||||
# Usage: POCO_INSTALL_PDB(target_name)
|
||||
# INPUT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user