summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-27 16:57:09 -0800
committerJosh Blum <josh@joshknows.com>2010-12-27 16:57:09 -0800
commit5c08896e6c4124de69f43f0765468dc4d517920b (patch)
tree47ef644eadac0e9271eb26e4e222035461f6bfae /host/CMakeLists.txt
parentbf8677c9a96c3ed7fae48a57759b9f4742cd7593 (diff)
parent7d3842dbd01175dc04cbd77e852b30af3ab5ac35 (diff)
downloaduhd-5c08896e6c4124de69f43f0765468dc4d517920b.tar.gz
uhd-5c08896e6c4124de69f43f0765468dc4d517920b.tar.bz2
uhd-5c08896e6c4124de69f43f0765468dc4d517920b.zip
Merge branch 'uhd_master' into uhd_next
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index efc439af0..f59cda23f 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -15,21 +15,25 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(UHD CXX)
-ENABLE_TESTING()
+########################################################################
+#IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+# MESSAGE(FATAL_ERROR "Prevented in-tree built. This is bad practice.")
+#ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
########################################################################
-# Config Files (include order is important)
+# Project setup
########################################################################
-INCLUDE(${CMAKE_SOURCE_DIR}/config/Component.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/config/Python.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/config/Version.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/config/CPack.cmake)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(UHD CXX)
+ENABLE_TESTING()
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Modules)
+INCLUDE(UHDComponent) #enable components
+INCLUDE(UHDPackage) #setup cpack
########################################################################
# Install Dirs
########################################################################
+SET(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
SET(RUNTIME_DIR bin)
SET(LIBRARY_DIR lib${LIB_SUFFIX})
SET(INCLUDE_DIR include)
@@ -102,7 +106,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
# Create Uninstall Target
########################################################################
CONFIGURE_FILE(
- ${CMAKE_SOURCE_DIR}/config/cmake_uninstall.cmake.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
@ONLY)
@@ -168,4 +172,5 @@ ENDIF(ENABLE_UTILS)
# Print Summary
########################################################################
UHD_PRINT_COMPONENT_SUMMARY()
+MESSAGE(STATUS "Building version: ${CPACK_PACKAGE_VERSION}")
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")