From 7099a084c7a7438a5f6ce34a2aca7ee5fa62ae7e Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sun, 17 Jan 2010 09:00:55 +0100 Subject: Add an "install" target. --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 147e39b2..a6b9aba2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ PROJECT (tome2) CMAKE_MINIMUM_REQUIRED (VERSION 2.6) +# We want a readable feature summary. +INCLUDE(FeatureSummary) + # Default flags. IF(CMAKE_COMPILER_IS_GNUCC) # Let's set sensible options. @@ -62,5 +65,19 @@ IF(CURSES_FOUND) SET(LIBS ${LIBS} ${CURSES_LIBRARIES}) ENDIF() +# +# Set the path for loading the library bits. +# +IF(SYSTEM_INSTALL) + SET(DEFAULT_PATH "${CMAKE_INSTALL_PREFIX}/lib/tome") +ELSE() + SET(DEFAULT_PATH "./lib") +ENDIF() +ADD_DEFINITIONS(-DDEFAULT_PATH="${DEFAULT_PATH}") + +# Print out a summary of features. +PRINT_ENABLED_FEATURES() + # Add the source subdirectory. ADD_SUBDIRECTORY (src) +ADD_SUBDIRECTORY (lib) -- cgit v1.2.3