summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--FindGeneratorRunner.cmake.in15
-rw-r--r--generatorrunner.pc.in13
3 files changed, 38 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a64c3b8..4e7bcb7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,12 @@ target_link_libraries(generatorrunner
${APIEXTRACTOR_LIBRARY}
${QT_QTCORE_LIBRARY})
+# create pkg-config file
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/generatorrunner.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/generatorrunner.pc @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FindGeneratorRunner.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/FindGeneratorRunner.cmake @ONLY)
+
# uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@@ -55,6 +61,10 @@ add_custom_target(dist
install(TARGETS genrunner DESTINATION ${LIB_INSTALL_DIR})
install(TARGETS generatorrunner DESTINATION bin)
install(FILES generator.h DESTINATION include/generatorrunner)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generatorrunner.pc DESTINATION
+ ${LIB_INSTALL_DIR}/pkgconfig)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindGeneratorRunner.cmake
+ DESTINATION share/cmake-2.6/Modules)
enable_testing()
diff --git a/FindGeneratorRunner.cmake.in b/FindGeneratorRunner.cmake.in
new file mode 100644
index 0000000..c6a431b
--- /dev/null
+++ b/FindGeneratorRunner.cmake.in
@@ -0,0 +1,15 @@
+# - try to find GENERATORRUNNER
+# GENERATORRUNNER_INCLUDE_DIR - Directories to include to use GENERATORRUNNER
+# GENERATORRUNNER_LIBRARIES - Files to link against to use GENERATORRUNNER
+# GENERATORRUNNER_FOUND - GENERATORRUNNER was found
+
+FIND_PATH(GENERATORRUNNER_INCLUDE_DIR generator.h @CMAKE_INSTALL_PREFIX@/include/generatorrunner)
+
+FIND_LIBRARY(GENERATORRUNNER_LIBRARY genrunner @CMAKE_INSTALL_PREFIX@/lib)
+
+SET(GENERATORRUNNER_FOUND "NO")
+IF(GENERATORRUNNER_LIBRARY AND GENERATORRUNNER_INCLUDE_DIR)
+ SET(GENERATORRUNNER_FOUND "YES")
+ENDIF(GENERATORRUNNER_LIBRARY AND GENERATORRUNNER_INCLUDE_DIR)
+
+
diff --git a/generatorrunner.pc.in b/generatorrunner.pc.in
new file mode 100644
index 0000000..20b8004
--- /dev/null
+++ b/generatorrunner.pc.in
@@ -0,0 +1,13 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_PREFIX@/lib
+includedir=@CMAKE_INSTALL_PREFIX@/include
+
+
+Name: generatorrunner
+Description: Python binding generator based on Boost.Python
+Requires: apiextractor
+Version: @boostpythongenerator_VERSION@
+Libs: -L${libdir} -lgenrunner
+Cflags: -I${includedir}
+