summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt31
1 files changed, 14 insertions, 17 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index e26ec03d2..ceea5d024 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -20,14 +20,11 @@ PROJECT(UHD CXX)
ENABLE_TESTING()
########################################################################
-# Setup CPack
+# Config Files (include order is important)
########################################################################
-SET(CPACK_PACKAGE_VERSION_MAJOR 0)
-SET(CPACK_PACKAGE_VERSION_MINOR 0)
-SET(CPACK_PACKAGE_VERSION_PATCH 0)
-SET(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README)
-SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
-INCLUDE(CPack) #include after setting vars
+INCLUDE(${CMAKE_SOURCE_DIR}/config/Python.cmake)
+INCLUDE(${CMAKE_SOURCE_DIR}/config/Version.cmake)
+INCLUDE(${CMAKE_SOURCE_DIR}/config/CPack.cmake)
########################################################################
# Install Dirs
@@ -42,7 +39,7 @@ MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
########################################################################
# Local Include Dir
########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
########################################################################
# Optional Compiler Flags
@@ -62,10 +59,10 @@ IF(NOT CMAKE_BUILD_TYPE)
ENDIF(NOT CMAKE_BUILD_TYPE)
IF(CMAKE_COMPILER_IS_GNUCXX)
- UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wall HAVE_WALL)
- UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wextra HAVE_WEXTRA)
- UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-pedantic HAVE_PEDANTIC)
- UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-ansi HAVE_ANSI)
+ ADD_DEFINITIONS(-Wall)
+ ADD_DEFINITIONS(-Wextra)
+ ADD_DEFINITIONS(-pedantic)
+ ADD_DEFINITIONS(-ansi)
#only export symbols that are declared to be part of the uhd api:
UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
@@ -81,12 +78,12 @@ ENDIF(MSVC)
########################################################################
# Setup Boost
########################################################################
-IF(EXISTS "/usr/lib64")
+IF(UNIX AND EXISTS "/usr/lib64")
LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-ENDIF(EXISTS "/usr/lib64")
+ENDIF(UNIX AND EXISTS "/usr/lib64")
-SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42 1.43.0" "1.43")
-FIND_PACKAGE(Boost 1.36 REQUIRED COMPONENTS
+SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43")
+FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS
date_time
filesystem
program_options
@@ -103,7 +100,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
# Create Uninstall Target
########################################################################
CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in
+ ${CMAKE_SOURCE_DIR}/config/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
@ONLY)