From fb24835ac5fc087460aa61bc08fa6b73d8ec507f Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Wed, 29 Dec 2010 00:31:20 +0100 Subject: [PATCH] First commit of cmake stubs - more to come --- CMakeLists.txt | 23 +++++++++++++++++++++++ doc/CMakeLists.txt | 0 i18n/CMakeLists.txt | 0 scripts/CMakeLists.txt | 0 src/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ test/CMakeLists.txt | 4 ++++ 6 files changed, 59 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 doc/CMakeLists.txt create mode 100644 i18n/CMakeLists.txt create mode 100644 scripts/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..399f2ca31 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required (VERSION 2.8) +set(cmake_allow_loose_loop_constructs true) + +project (task) + +set (package "task") +set (version "1.9.4") +set (package_bugreport "support@taskwarrior.org") +set (package_name "${package}") +set (package_tarname "${package}") +set (package_version "${version}") +set (package_string "${package} ${version}") + +add_definitions(-DPACKAGE="${package}") +add_definitions(-DVERSION="${version}") +add_definitions(-DPACKAGE_BUGREPORT="${package_bugreport}") +add_definitions(-DPACKAGE_NAME="${package_name}") +add_definitions(-DPACKAGE_TARNAME="${ipackage_tarname}") +add_definitions(-DPACKAGE_VERSION="${package_version}") +add_definitions(-DPACKAGE_STRING="${package_string}") + +add_subdirectory (src) +add_subdirectory (test EXCLUDE_FROM_ALL) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/i18n/CMakeLists.txt b/i18n/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..f5fa134a1 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 2.8) + +include_directories (${CMAKE_SOURCE_DIR}/src) +find_package (Lua51) +include (${LUA_INCLUDE_DIR}) + +set (task_SRCS API.cpp API.h Att.cpp Att.h Cmd.cpp Cmd.h Color.cpp Color.h + Config.cpp Config.h Context.cpp Context.h Date.cpp Date.h + Directory.cpp Directory.h Duration.cpp Duration.h File.cpp + File.h Filter.cpp Filter.h Grid.cpp Grid.h Hooks.cpp Hooks.h + Keymap.cpp Keymap.h Lisp.cpp Lisp.h Location.cpp Location.h + Nibbler.cpp Nibbler.h Path.cpp Path.h Permission.cpp + Permission.h Record.cpp Record.h Rectangle.cpp Rectangle.h + Sensor.cpp Sensor.h Sequence.cpp Sequence.h StringTable.cpp + StringTable.h Subst.cpp Subst.h TDB.cpp TDB.h Table.cpp Table.h + Task.cpp Task.h Taskmod.cpp Taskmod.h Thread.cpp Thread.h + Timer.cpp Timer.h Transport.cpp Transport.h TransportSSH.cpp + TransportSSH.h TransportRSYNC.cpp TransportRSYNC.h + TransportCurl.cpp TransportCurl.h Tree.cpp Tree.h burndown.cpp + command.cpp custom.cpp dependency.cpp diag.cpp edit.cpp + export.cpp history.cpp i18n.h import.cpp interactive.cpp + main.cpp main.h recur.cpp report.cpp rules.cpp rx.cpp rx.h + text.cpp text.h util.cpp util.h Uri.cpp Uri.h) + +add_executable (task ${task_SRCS}) +target_link_libraries (task ${LUA_LIBRARIES}) +install (TARGETS task DESTINATION bin) + +set (CMAKE_BUILD_TYPE debug) +set (CMAKE_C_FLAGS_DEBUG "-ggdb3") +set (CMAKE_C_FLAGS_RELEASE "-O3") + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..e611fac3b --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,4 @@ +include_directories (${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/test) +add_custom_target (test ./run_all DEPENDS date.t + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) +add_executable (date.t date.t.cpp test.cpp)