Files
taskwarrior-2.x/CMakeLists.txt
Federico Hernandez 51fd0afade CMake
- moved configuration stuff from src to top level cmake file
- building static library task and using it for building task binary
- the static library will then be used as well in the unit tests
2011-01-02 23:45:25 +01:00

52 lines
1.5 KiB
CMake

cmake_minimum_required (VERSION 2.8)
include (CheckFunctionExists)
project (task)
set (PROJECT_VERSION "1.9.4")
set (PACKAGE "${PROJECT_NAME}")
set (VERSION "${PROJECT_VERSION}")
set (PACKAGE_BUGREPORT "support@taskwarrior.org")
set (PACKAGE_NAME "${PACKAGE}")
set (PACKAGE_TARNAME "${PACKAGE}")
set (PACKAGE_VERSION "${VERSION}")
set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
find_package (Lua51)
if (LUA51_FOUND)
set (HAVE_LIBLUA true)
endif (LUA51_FOUND)
find_path (PTHREAD_INCLUDE_DIR pthread.h)
find_library (PTHREAD_LIBRARY NAMES pthread)
if (PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY)
message ("-- Found pthread: ${PTHREAD_LIBRARY}")
set (HAVE_LIBPTHREAD true)
endif (PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY)
#find_path (READLINE_INCLUDE_DIR readline/readline.h)
#find_library (READLINE_LIBRARY NAMES readline)
#if (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
# set (HAVE_LIBREADLINE true)
# set (HAVE_READLINE true)
#endif (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
check_function_exists (random HAVE_RANDOM)
check_function_exists (srandom HAVE_SRANDOM)
check_function_exists (uuid_unparse_lower HAVE_UUID)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (LINUX true)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (DARWIN true)
else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (UNKNOWN true)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
configure_file (
${CMAKE_SOURCE_DIR}/cmake.h.in
${CMAKE_SOURCE_DIR}/auto.h)
add_subdirectory (src)
add_subdirectory (test EXCLUDE_FROM_ALL)