2022-10-06 17:54:18 +08:00
|
|
|
function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
|
2022-10-06 03:52:19 +08:00
|
|
|
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}
|
|
|
|
)
|
2022-10-06 17:54:18 +08:00
|
|
|
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}")
|
2022-10-06 03:52:19 +08:00
|
|
|
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
|
|
|
endif()
|
2022-10-06 17:54:18 +08:00
|
|
|
set(JKQTP_CURRENT_TARGET_SHAREDPART "${BuildTypePart}")
|
2022-10-06 03:52:19 +08:00
|
|
|
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
|
|
|
|
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
|
|
|
DESTINATION lib/cmake
|
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
|
|
|
|
DESTINATION lib/cmake )
|
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
|
|
|
|
DESTINATION lib/cmake )
|
|
|
|
endfunction(jkqtplotter_installlibrary)
|