From e5c0c21961261f7e55c6ebb8eeca60c29bc6def8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Vavru=C5=A1a?= Date: Tue, 16 Dec 2008 14:57:44 +0100 Subject: [PATCH] Added cmake rules for pkgconfig files --- CMakeLists.txt | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba9d51f..92d9b87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ set(CPACK_COMPONENT_HEADERS_DESCRIPTION set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") set(CPACK_COMPONENT_STATICLIBS_GROUP "Development") -set(CPACK_COMPONENT_HEADERS_GROUP "Development") +set(CPACK_COMPONENT_HEADERS_GROUP "Development") # Documentation find_package(Doxygen) @@ -93,4 +93,19 @@ add_subdirectory(ftdipp) add_subdirectory(examples) add_subdirectory(packages) +# PkgConfig +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) +set(includedir ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) + +if(${UNIX}) + set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +endif(${UNIX}) +if(${WIN32}) + set(libdir ${CMAKE_INSTALL_PREFIX}/bin) +endif(${WIN32}) + +configure_file(${CMAKE_SOURCE_DIR}/libftdi.pc.in ${CMAKE_BINARY_DIR}/libftdi.pc @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/libftdipp.pc.in ${CMAKE_BINARY_DIR}/libftdipp.pc @ONLY) + include(CPack) -- 1.7.1