summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-12 13:55:57 +0000
committerJosh Blum <josh@joshknows.com>2010-04-12 13:55:57 +0000
commit615f7081d8361643031437ac31bb4a44e41839e8 (patch)
treef092991d1f3ff97fa53d9373c90e358105c4ff79 /host/CMakeLists.txt
parent50780640a1b9ed6abb2abebbc727ce19711fbcb4 (diff)
parent34854116a4fd287fe681222f2b7a881692e418d3 (diff)
downloaduhd-615f7081d8361643031437ac31bb4a44e41839e8.tar.gz
uhd-615f7081d8361643031437ac31bb4a44e41839e8.tar.bz2
uhd-615f7081d8361643031437ac31bb4a44e41839e8.zip
Merge branch 'master' into usrp_e
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt42
1 files changed, 33 insertions, 9 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 05d782abe..d2889fe58 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -36,6 +36,7 @@ SET(RUNTIME_DIR bin)
SET(LIBRARY_DIR lib)
SET(INCLUDE_DIR include)
SET(PKG_DATA_DIR share/uhd)
+SET(PKG_DOC_DIR share/doc/uhd)
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
########################################################################
@@ -101,23 +102,21 @@ ENDIF(HAVE_BIG_ENDIAN)
# Create Uninstall Target
########################################################################
CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- @ONLY
-)
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
+@ONLY)
ADD_CUSTOM_TARGET(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
)
########################################################################
# Create Pkg Config File
########################################################################
CONFIGURE_FILE(
- "${CMAKE_SOURCE_DIR}/uhd.pc.in"
- "${CMAKE_CURRENT_BINARY_DIR}/uhd.pc"
- @ONLY
-)
+ ${CMAKE_SOURCE_DIR}/uhd.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
+@ONLY)
INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
@@ -125,6 +124,31 @@ INSTALL(
)
########################################################################
+# Setup Docs
+########################################################################
+INCLUDE(FindDoxygen)
+
+IF(DOXYGEN_FOUND)
+ SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
+ CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/Doxyfile.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ @ONLY)
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ COMMENT "Generating documentation with doxygen"
+ )
+ ADD_CUSTOM_TARGET(docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR})
+ENDIF(DOXYGEN_FOUND)
+
+INSTALL(FILES
+ ${CMAKE_SOURCE_DIR}/README
+ ${CMAKE_SOURCE_DIR}/LICENSE
+ DESTINATION ${PKG_DOC_DIR}
+)
+
+########################################################################
# Add the subdirectories
########################################################################
ADD_SUBDIRECTORY(examples)