BUGFIX: Error for PDBs when building STATIC libs on MSVC

BUGFIX: a variable in the ...Config.cmake-files was not set correctly
This commit is contained in:
jkriege2 2022-10-06 11:54:18 +02:00
parent 62f27ce9c1
commit ddcc9ea462
6 changed files with 14 additions and 12 deletions

View File

@ -1,13 +1,15 @@
function(jkqtplotter_installlibrary lib_name libIncludeSubdir)
function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
install(TARGETS ${lib_name} EXPORT ${lib_name}_TARGETS
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
)
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1"))
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1") AND (NOT BuildTypePart STREQUAL ""))
message(STATUS "?????????????? INSTALL PDF BuildTypePart=${BuildTypePart}")
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()
set(JKQTP_CURRENT_TARGET_SHAREDPART "${BuildTypePart}")
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
install(EXPORT ${lib_name}_TARGETS

View File

@ -114,11 +114,11 @@ endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS}

View File

@ -115,11 +115,11 @@ endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS}

View File

@ -85,11 +85,11 @@ endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS}

View File

@ -184,11 +184,11 @@ endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS}

View File

@ -263,11 +263,11 @@ endif()
# Installation
if(JKQtPlotter_BUILD_SHARED_LIBS)
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
endif(JKQtPlotter_BUILD_SHARED_LIBS)
if(JKQtPlotter_BUILD_STATIC_LIBS)
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
endif(JKQtPlotter_BUILD_STATIC_LIBS)
install(FILES ${HEADERS_BASE}