mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
NEW: When using a MSVC compiler, the generated PDB files are installed to CMAKE_INSTALL_PREFIX/bin/
This commit is contained in:
parent
7b715541e7
commit
62f27ce9c1
@ -39,6 +39,9 @@ include(jkqtplotter_common_compilersettings)
|
||||
# include Qt with appropriate options to build this lib
|
||||
include(jkqtplotter_common_qtsettings)
|
||||
|
||||
# additionnal common macros
|
||||
include(jkqtplotter_macros)
|
||||
|
||||
|
||||
|
||||
# now add subdirectories with the library code ...
|
||||
|
22
cmake/jkqtplotter_macros.cmake
Normal file
22
cmake/jkqtplotter_macros.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
function(jkqtplotter_installlibrary lib_name libIncludeSubdir)
|
||||
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"))
|
||||
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
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)
|
@ -18,6 +18,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
|
||||
<li>CLEANUP (BREAKING) of library structure</li>
|
||||
<li>NEW: Using precompiled headers in CMake-build to speed up build times</li>
|
||||
<li>NEW/BREAKING: split jkqtcommon into basic tools and jkqtcommon_statistics_and_math for advanced math tools not used by all libs</li>
|
||||
<li>NEW: When using a MSVC compiler, the generated PDB files are installed to \c CMAKE_INSTALL_PREFIX/bin/ </li>
|
||||
</ul></li>
|
||||
<li>JKQTPlotter:<ul>
|
||||
<li>FIXED issue described in <a href="https://github.com/jkriege2/JKQtPlotter/pull/62">#62: Fix custom labels draw, because giving exactly two label-strings did not display all of them</a>, thanks to <a href="https://github.com/FalsinSoft">user:FalsinSoft</a></li>
|
||||
|
@ -114,51 +114,18 @@ endif()
|
||||
|
||||
# Installation
|
||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||
)
|
||||
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
|
||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
|
||||
install(EXPORT ${libsh_name}_TARGETS
|
||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
|
||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
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}
|
||||
)
|
||||
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 )
|
||||
|
||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
|
||||
install(FILES ${HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||
COMPONENT Headers)
|
||||
|
||||
|
||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
||||
|
@ -115,45 +115,11 @@ endif()
|
||||
|
||||
# Installation
|
||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||
)
|
||||
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
|
||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
|
||||
install(EXPORT ${libsh_name}_TARGETS
|
||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
|
||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
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}
|
||||
)
|
||||
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 )
|
||||
|
||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
|
||||
install(FILES ${HEADERS}
|
||||
|
@ -85,45 +85,11 @@ endif()
|
||||
|
||||
# Installation
|
||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "Shared")
|
||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
|
||||
install(EXPORT ${libsh_name}_TARGETS
|
||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
|
||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
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}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "")
|
||||
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 )
|
||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
|
||||
install(FILES ${HEADERS}
|
||||
|
@ -184,45 +184,11 @@ endif()
|
||||
|
||||
# Installation
|
||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "Shared")
|
||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
|
||||
install(EXPORT ${libsh_name}_TARGETS
|
||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
|
||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
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}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "")
|
||||
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 )
|
||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
|
||||
install(FILES ${HEADERS}
|
||||
|
@ -263,45 +263,11 @@ endif()
|
||||
|
||||
# Installation
|
||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${libsh_name} EXPORT ${libsh_name}_TARGETS
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${libsh_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "Shared")
|
||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake" @ONLY)
|
||||
install(EXPORT ${libsh_name}_TARGETS
|
||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Config.cmake"
|
||||
DESTINATION lib/cmake )
|
||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
||||
|
||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
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}
|
||||
)
|
||||
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
|
||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "")
|
||||
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 )
|
||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir})
|
||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
||||
|
||||
install(FILES ${HEADERS_BASE}
|
||||
|
Loading…
Reference in New Issue
Block a user