mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-13 10:42:56 +01:00
add option to disable installing g3log for project embedding (#333)
This commit is contained in:
parent
3a905ed83d
commit
3ffc36a3a2
@ -31,34 +31,37 @@ SET(CPACK_PACKAGE_CONTACT "Kjell Hedstrom hedstrom@kjellkoc.cc")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE ${g3log_SOURCE_DIR}/LICENSE)
|
||||
SET(CPACK_PACKAGE_VENDOR "KjellKod")
|
||||
|
||||
INSTALL( TARGETS g3logger
|
||||
EXPORT g3logger-targets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
IF(INSTALL_G3LOG)
|
||||
INSTALL( TARGETS g3logger
|
||||
EXPORT g3logger-targets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
INSTALL( FILES ${HEADER_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/g3log
|
||||
COMPONENT headers)
|
||||
INSTALL( FILES ${HEADER_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/g3log
|
||||
COMPONENT headers)
|
||||
|
||||
INSTALL(
|
||||
EXPORT g3logger-targets
|
||||
FILE g3loggerTargets.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
INSTALL(
|
||||
EXPORT g3logger-targets
|
||||
FILE g3loggerTargets.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
|
||||
CONFIGURE_PACKAGE_CONFIG_FILE(
|
||||
${PROJECT_SOURCE_DIR}/cmake/g3loggerConfig.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/g3loggerConfig.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
CONFIGURE_PACKAGE_CONFIG_FILE(
|
||||
${PROJECT_SOURCE_DIR}/cmake/g3loggerConfig.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/g3loggerConfig.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/g3loggerConfig.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/g3loggerConfig.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/g3logger
|
||||
)
|
||||
|
||||
SET(CPACK_COMPONENTS_ALL libraries headers)
|
||||
SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "G3Log libraries")
|
||||
|
@ -147,6 +147,7 @@ IF (MSVC OR MINGW)
|
||||
ENDIF (MSVC OR MINGW)
|
||||
message( STATUS "\n\n\n" )
|
||||
|
||||
option(INSTALL_G3LOG "Enable installation of g3logger. (Projects embedding g3logger may want to turn this OFF.)" ON)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user