aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-24 15:38:57 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-24 17:31:43 -0300
commit490d84059bcef9b832e39a608acbbe1401347212 (patch)
tree91a21a4f26ab6372a263750fdef251ff992fd46f /CMakeLists.txt
parente363a1d1d2aa2a05139719adc02756766bc92cc1 (diff)
Remove FindApiExtractor.cmake file in favor of ApiExtractorConfig and Version .cmake files.
This is the right way to go, according to: - http://www.cmake.org/pipermail/cmake/2009-April/028504.html - http://www.cmake.org/Wiki/CMake_2.6_Notes#Packages Reviewed by Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 12 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87052ec9..c46b7b26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,9 +81,10 @@ target_link_libraries(apiextractor ${LIBXSLT_LIBRARIES} ${LIBXML2_LIBRARIES} ${Q
set_target_properties(apiextractor PROPERTIES VERSION ${apiextractor_VERSION} SOVERSION ${apiextractor_MAJOR_VERSION})
# create pkg-config file
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/apiextractor.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc @ONLY)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FindApiExtractor.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindApiExtractor.cmake @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/apiextractor.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ApiExtractorConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ApiExtractorConfig.cmake" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ApiExtractorVersion.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ApiExtractorVersion.cmake" @ONLY)
# uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
@@ -110,9 +111,12 @@ enable_testing()
add_subdirectory(tests)
install(FILES ${root_HEADERS} DESTINATION include/apiextractor)
-install(TARGETS apiextractor LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+install(TARGETS apiextractor EXPORT apiextractor
+ LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
+ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
RUNTIME DESTINATION bin)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindApiExtractor.cmake
- DESTINATION "share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ApiExtractorConfig.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/ApiExtractor-${apiextractor_VERSION}")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ApiExtractorVersion.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/ApiExtractor-${apiextractor_VERSION}")