mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-18 20:24:04 +01:00
Merge pull request #850 from pwm1234/feature/cmake-pwm-squashed
cmake improvements for msvc
This commit is contained in:
commit
3baf590485
@ -92,6 +92,9 @@ option(POCO_UNBUNDLED
|
||||
if(MSVC)
|
||||
option(POCO_MT
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
||||
|
||||
option(ENABLE_MSVC_MP
|
||||
"Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC" OFF)
|
||||
endif()
|
||||
|
||||
# Uncomment from next two lines to force static or dynamic library, default is autodetection
|
||||
|
@ -40,6 +40,11 @@ if(MSVC)
|
||||
else(POCO_MT)
|
||||
set(STATIC_POSTFIX "md" CACHE STRING "Set static library postfix" FORCE)
|
||||
endif(POCO_MT)
|
||||
|
||||
if (ENABLE_MSVC_MP)
|
||||
add_definitions(/MP)
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
@ -250,4 +250,31 @@ install(
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
||||
# install the targets pdb
|
||||
POCO_INSTALL_PDB(${target_name})
|
||||
|
||||
endmacro()
|
||||
|
||||
# POCO_INSTALL_PDB - Install the given target's companion pdb file (if present)
|
||||
# Usage: POCO_INSTALL_PDB(target_name)
|
||||
# INPUT:
|
||||
# target_name the name of the target. e.g. Foundation for PocoFoundation
|
||||
# Example: POCO_INSTALL_PDB(Foundation)
|
||||
#
|
||||
# This is an internal macro meant only to be used by POCO_INSTALL.
|
||||
macro(POCO_INSTALL_PDB target_name)
|
||||
if (NOT MSVC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_property(type TARGET ${target_name} PROPERTY TYPE)
|
||||
if ("${type}" STREQUAL "SHARED_LIBRARY" OR "${type}" STREQUAL "EXECUTABLE")
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${target_name}>
|
||||
DESTINATION bin
|
||||
COMPONENT Devel
|
||||
OPTIONAL
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
Loading…
Reference in New Issue
Block a user