update the project URL everywhere
[libftdi] / CMakeLists.txt
index 213cb1c..92d9b87 100644 (file)
@@ -33,7 +33,28 @@ 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)
+if(DOXYGEN_FOUND)
+
+   # Set variables
+   set(PACKAGE libftdi)
+   set(VERSION ${VERSION_STRING})
+   set(top_srcdir ${CMAKE_SOURCE_DIR})
+
+   # Find doxy config
+   message(STATUS "Doxygen found.")
+   set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc")
+   set(DOXY_CONFIG "${DOXY_DIR}/Doxyfile.in")
+
+   # Copy doxy.config.in
+   configure_file("${DOXY_DIR}/header.html" "${CMAKE_BINARY_DIR}/header.html" COPYONLY)
+   configure_file("${DOXY_CONFIG}" "${CMAKE_BINARY_DIR}/doxy.config")
+   add_custom_target(doc "${DOXYGEN_EXECUTABLE}" "doxy.config")
+
+endif(DOXYGEN_FOUND)
 
 # Package information
 set(CPACK_PACKAGE_VERSION              ${VERSION_STRING})
@@ -72,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)