mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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
This commit is contained in:
parent
101bc8045b
commit
51fd0afade
3 changed files with 55 additions and 55 deletions
|
@ -1,7 +1,51 @@
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue