diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 39 |
2 files changed, 7 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 97776a2..f4b5e09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,9 +430,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) set (CMAKE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." ) - set (CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb filess." - ) else () set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) endif () @@ -479,7 +476,7 @@ if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS) endif () #----------------------------------------------------------------------------- -# Option to Build Shared and Static libs, default is static +# Option to Build Shared and Static libs, default is both #----------------------------------------------------------------------------- option (BUILD_SHARED_LIBS "Build Shared Libraries" ON) set (H5_ENABLE_SHARED_LIB NO) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index dac5635..b151a45 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -46,8 +46,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) get_target_property (target_type ${libtarget} TYPE) if (target_type MATCHES "STATIC_LIBRARY") get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO) - get_property (target_dir TARGET ${libtarget} PROPERTY COMPILE_PDB_OUTPUT_DIRECTORY) - set (targetfilename ${target_dir}/${target_name}.pdb) + set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb) else () set (targetfilename $<TARGET_PDB_FILE:${libtarget}>) endif () @@ -103,15 +102,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) - if (WIN32 AND NOT ${libtype} MATCHES "SHARED") - set_target_properties (${libtarget} - PROPERTIES - COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME} - COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME} - COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME} - COMPILE_PDB_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} - ) - endif () #----- Use MSVC Naming conventions for Shared Libraries if (MINGW AND ${libtype} MATCHES "SHARED") @@ -122,7 +112,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) PREFIX "" ) endif () - endmacro () #------------------------------------------------------------------------------- @@ -149,7 +138,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) set_target_properties (${libtarget} PROPERTIES IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) + ) endif () else () if (CYGWIN) @@ -186,22 +175,14 @@ macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags) if (MSVC) TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}") else () - set_target_properties (${wintarget} - PROPERTIES - COMPILE_FLAGS "${addcompileflags}" - LINK_FLAGS "${addlinkflags}" - ) + set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}") endif () endmacro () #------------------------------------------------------------------------------- macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags) if (MSVC) - set_target_properties (${wintarget} - PROPERTIES - COMPILE_FLAGS "${addcompileflags}" - LINK_FLAGS "${addlinkflags}" - ) + set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}") endif () endmacro () @@ -216,17 +197,9 @@ endmacro () macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags) if (MSVC) if (${libtype} MATCHES "SHARED") - set_target_properties (${forttarget} - PROPERTIES - COMPILE_FLAGS "/dll ${addcompileflags}" - LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" - ) + set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}") else () - set_target_properties (${forttarget} - PROPERTIES - COMPILE_FLAGS "${addcompileflags}" - LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" - ) + set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}") endif () endif () endmacro () |