mirror of
https://github.com/GothenburgBitFactory/taskshell.git
synced 2025-06-26 10:54:29 +02:00
CMake Files
- Main CMake files.
This commit is contained in:
parent
dee1f50192
commit
f2a59d8543
3 changed files with 318 additions and 0 deletions
123
CMakeLists.txt
Normal file
123
CMakeLists.txt
Normal file
|
@ -0,0 +1,123 @@
|
|||
cmake_minimum_required (VERSION 2.8)
|
||||
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
|
||||
|
||||
include (CheckFunctionExists)
|
||||
include (CheckStructHasMember)
|
||||
|
||||
set (HAVE_CMAKE true)
|
||||
|
||||
project (tasksh)
|
||||
set (PROJECT_VERSION "0.9.0.dev")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set (LINUX true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (DARWIN true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
||||
set (KFREEBSD true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set (FREEBSD true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set (OPENBSD true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
set (NETBSD true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
set (SOLARIS true)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
|
||||
set (GNUHURD true)
|
||||
else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set (UNKNOWN true)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
if (NETBSD)
|
||||
# Since readline, etc likely to be in /usr/pkg/lib, not standard library
|
||||
# Otherwise will remove links during install
|
||||
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
endif (NETBSD)
|
||||
|
||||
if (FREEBSD)
|
||||
SET (TASKSH_MAN1DIR man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
else (FREEBSD)
|
||||
SET (TASKSH_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
endif (FREEBSD)
|
||||
SET (TASKSH_DOCDIR share/doc/tasksh CACHE STRING "Installation directory for doc files")
|
||||
SET (TASKSH_RCDIR "${TASKSH_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files")
|
||||
SET (TASKSH_BINDIR bin CACHE STRING "Installation directory for the binary")
|
||||
|
||||
message ("-- Looking for SHA1 references")
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
|
||||
set (HAVE_COMMIT true)
|
||||
execute_process (COMMAND git log -1 --pretty=format:%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE COMMIT)
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/commit.h.in
|
||||
${CMAKE_SOURCE_DIR}/commit.h)
|
||||
message ("-- Found SHA1 reference: ${COMMIT}")
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
|
||||
|
||||
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}")
|
||||
|
||||
message ("-- Looking for pthread")
|
||||
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)
|
||||
set (TASKSH_INCLUDE_DIRS ${TASKSH_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR})
|
||||
set (TASKSH_LIBRARIES ${TASKSH_LIBRARIES} ${PTHREAD_LIBRARIES})
|
||||
endif (PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY)
|
||||
|
||||
# include the readline library finder module
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
|
||||
|
||||
# find readline
|
||||
message ("-- Looking for GNU Readline")
|
||||
find_package (Readline)
|
||||
if (READLINE_FOUND)
|
||||
set (HAVE_READLINE true)
|
||||
set (TASKSH_INCLUDE_DIRS ${TASKSH_INCLUDE_DIRS} ${READLINE_INCLUDE_DIR})
|
||||
set (TASKSH_LIBRARIES ${TASKSH_LIBRARIES} ${READLINE_LIBRARIES})
|
||||
endif (READLINE_FOUND)
|
||||
|
||||
check_function_exists (wordexp HAVE_WORDEXP)
|
||||
|
||||
# Set the package language.
|
||||
if (LANGUAGE)
|
||||
set (PACKAGE_LANGUAGE ${LANGUAGE})
|
||||
else (LANGUAGE)
|
||||
set (PACKAGE_LANGUAGE 1)
|
||||
endif (LANGUAGE)
|
||||
|
||||
set (LANGUAGE_ENG_USA 1)
|
||||
|
||||
message ("-- Configuring cmake.h")
|
||||
configure_file (
|
||||
${CMAKE_SOURCE_DIR}/cmake.h.in
|
||||
${CMAKE_SOURCE_DIR}/cmake.h)
|
||||
|
||||
add_subdirectory (src)
|
||||
add_subdirectory (doc)
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/test)
|
||||
add_subdirectory (test EXCLUDE_FROM_ALL)
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/test)
|
||||
|
||||
set (doc_FILES NEWS ChangeLog README.md INSTALL AUTHORS COPYING)
|
||||
foreach (doc_FILE ${doc_FILES})
|
||||
install (FILES ${doc_FILE} DESTINATION ${TASKSH_DOCDIR})
|
||||
endforeach (doc_FILE)
|
||||
|
||||
# ---
|
||||
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
|
||||
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
|
||||
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
|
||||
"test" "package-config" "misc/*" "src/tasksh$"
|
||||
"/\\.gitignore" "/\\.git/" "swp$")
|
||||
include (CPack)
|
12
doc/CMakeLists.txt
Normal file
12
doc/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
cmake_minimum_required (VERSION 2.8)
|
||||
message ("-- Configuring man pages")
|
||||
set (man_FILES tasksh.1)
|
||||
foreach (man_FILE ${man_FILES})
|
||||
configure_file (
|
||||
man/${man_FILE}.in
|
||||
man/${man_FILE})
|
||||
endforeach (man_FILE)
|
||||
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/ DESTINATION ${TASK_MAN1DIR}
|
||||
FILES_MATCHING PATTERN "*.1")
|
||||
|
183
doc/man/tasksh.1.in
Normal file
183
doc/man/tasksh.1.in
Normal file
|
@ -0,0 +1,183 @@
|
|||
.TH tasksh 1 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
|
||||
|
||||
.SH NAME
|
||||
tasksh \- Interactive taskwarrior shell
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B tasksh [<commands-file>]
|
||||
.br
|
||||
.B tasksh --version
|
||||
.br
|
||||
.B tasksh --help
|
||||
|
||||
.SH DESCRIPTION
|
||||
The tasksh program can be used to create a more immersive task environment.
|
||||
Any task command you run outside the shell can also be run inside the shell,
|
||||
without the need to prefix every command with "task".
|
||||
|
||||
.br
|
||||
Moreover, task commands can be written in a file which can be passed or
|
||||
redirected to tasksh for batch execution.
|
||||
|
||||
.RS
|
||||
$ tasksh
|
||||
.br
|
||||
.B task 2.3.0
|
||||
shell
|
||||
.br
|
||||
|
||||
.br
|
||||
Enter any task command (such as 'list'), or hit 'Enter'.
|
||||
.br
|
||||
There is no need to include the 'task' command itself.
|
||||
.br
|
||||
Enter 'quit' to end the session.
|
||||
.br
|
||||
|
||||
.br
|
||||
task> projects
|
||||
.br
|
||||
|
||||
.br
|
||||
Project Tasks Pri:None Pri:L Pri:M Pri:H
|
||||
.br
|
||||
------- ----- -------- ----- ----- -----
|
||||
.br
|
||||
7 7 0 0 0
|
||||
.br
|
||||
home 2 2 0 0 0
|
||||
.br
|
||||
party 6 3 0 0 3
|
||||
.br
|
||||
|
||||
.br
|
||||
3 projects (15 tasks)
|
||||
.br
|
||||
task> tags
|
||||
.br
|
||||
|
||||
.br
|
||||
Tag Count
|
||||
.br
|
||||
mall 2
|
||||
.br
|
||||
|
||||
.br
|
||||
1 tag (15 tasks)
|
||||
.br
|
||||
task> list
|
||||
.br
|
||||
|
||||
.br
|
||||
ID Project Pri Due Active Age Description
|
||||
.br
|
||||
---------------------------------------------------------------------
|
||||
.br
|
||||
2 party H 10/17/2010 2 hrs Select and book a venue
|
||||
.br
|
||||
5 party H 10/22/2010 2 hrs Design invitations
|
||||
.br
|
||||
9 home 10/31/2010 1 hr Pay rent
|
||||
.br
|
||||
3 party 2 hrs Mail invitations
|
||||
.br
|
||||
4 party 2 hrs Select a caterer
|
||||
.br
|
||||
6 party 2 hrs Print invitations
|
||||
.br
|
||||
|
||||
.br
|
||||
8 tasks
|
||||
.br
|
||||
task> quit
|
||||
.br
|
||||
$
|
||||
.br
|
||||
$ cat task.commands
|
||||
.br
|
||||
add foo
|
||||
.br
|
||||
add bar
|
||||
.br
|
||||
$ tasksh task.commands
|
||||
.br
|
||||
task 2.3.0 shell
|
||||
.br
|
||||
|
||||
.br
|
||||
Enter any task command (such as 'list'), or hit 'Enter'.
|
||||
.br
|
||||
There is no need to include the 'task' command itself.
|
||||
.br
|
||||
Enter 'quit' to end the session.
|
||||
.br
|
||||
|
||||
.br
|
||||
task> add foo
|
||||
.br
|
||||
Created task 8.
|
||||
.br
|
||||
task> add bar
|
||||
.br
|
||||
Created task 9.
|
||||
.br
|
||||
$
|
||||
.br
|
||||
$ cat task.commands | tasksh
|
||||
.br
|
||||
task 2.3.0 shell
|
||||
.br
|
||||
|
||||
.br
|
||||
Enter any task command (such as 'list'), or hit 'Enter'.
|
||||
.br
|
||||
There is no need to include the 'task' command itself.
|
||||
.br
|
||||
Enter 'quit' to end the session.
|
||||
.br
|
||||
|
||||
.br
|
||||
task> add foo
|
||||
.br
|
||||
Created task 8.
|
||||
.br
|
||||
task> add bar
|
||||
.br
|
||||
Created task 9.
|
||||
.br
|
||||
|
||||
.RE
|
||||
|
||||
.SH "CREDITS & COPYRIGHTS"
|
||||
Copyright (C) 2006 \- 2014 P. Beckingham, F. Hernandez.
|
||||
|
||||
This man page was originally written by Federico Hernandez.
|
||||
|
||||
Taskwarrior is distributed under the MIT license. See
|
||||
http://www.opensource.org/licenses/mit-license.php for more information.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR task(1),
|
||||
.BR taskrc(5),
|
||||
.BR task-color(5),
|
||||
.BR task-sync(5)
|
||||
|
||||
For more information regarding taskwarrior, see the following:
|
||||
|
||||
.TP
|
||||
The official site at
|
||||
<http://taskwarrior.org>
|
||||
|
||||
.TP
|
||||
The official code repository at
|
||||
<https://git.tasktools.org/scm/tm/task.git>
|
||||
|
||||
.TP
|
||||
You can contact the project by emailing
|
||||
<support@taskwarrior.org>
|
||||
|
||||
.SH REPORTING BUGS
|
||||
.TP
|
||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
||||
<http://taskwarrior.org>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue