Commit 41a19a3b authored by Martin Killenberg's avatar Martin Killenberg
Browse files

added support for pkgconfig

parent dcc09cfb
Name: @PROJECT_NAME@
Description: Config for @PROJECT_NAME@
Version: @@PROJECT_NAME@_SOVERSION@
Cflags: @@PROJECT_NAME@_CXX_FLAGS_MAKEFILE@
Libs: @@PROJECT_NAME@_LINKER_FLAGS_MAKEFILE@
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# #
####################################################################################################################### #######################################################################################################################
# create variables for standard makefiles # create variables for standard makefiles and pkgconfig
set(${PROJECT_NAME}_CXX_FLAGS_MAKEFILE "${${PROJECT_NAME}_CXX_FLAGS}") set(${PROJECT_NAME}_CXX_FLAGS_MAKEFILE "${${PROJECT_NAME}_CXX_FLAGS}")
string(REPLACE " " ";" LIST "${${PROJECT_NAME}_INCLUDE_DIRS}") string(REPLACE " " ";" LIST "${${PROJECT_NAME}_INCLUDE_DIRS}")
...@@ -79,6 +79,11 @@ configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake.in ...@@ -79,6 +79,11 @@ configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake.in
configure_file(cmake/PROJECT_NAME-config.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in" @ONLY) configure_file(cmake/PROJECT_NAME-config.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in" @ONLY)
configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config" @ONLY) configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config" @ONLY)
# create the pkgconfig file
configure_file(cmake/PROJECT_NAME.pc.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}.pc.in" @ONLY)
configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}.pc.in "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc" @ONLY)
# install cmake find_package configuration file # install cmake find_package configuration file
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION lib/cmake/${PROJECT_NAME} COMPONENT dev) DESTINATION lib/cmake/${PROJECT_NAME} COMPONENT dev)
...@@ -92,3 +97,5 @@ install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" ...@@ -92,3 +97,5 @@ install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
# install script for Makefiles # install script for Makefiles
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config DESTINATION bin COMPONENT dev) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config DESTINATION bin COMPONENT dev)
# install configuration file for pkgconfig
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc" DESTINATION share/pkgconfig COMPONENT dev)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment