mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Build: Migrated from cmake ExternalProject_Add to git submodule
This commit is contained in:
parent
6d1d3832b8
commit
095027f46a
3 changed files with 26 additions and 15 deletions
|
@ -5,7 +5,6 @@ set (HAVE_CMAKE true)
|
||||||
|
|
||||||
project (timew)
|
project (timew)
|
||||||
include (CXXSniffer)
|
include (CXXSniffer)
|
||||||
include (ExternalProject)
|
|
||||||
|
|
||||||
set (PROJECT_VERSION "0.1.0")
|
set (PROJECT_VERSION "0.1.0")
|
||||||
|
|
||||||
|
@ -42,12 +41,6 @@ configure_file (
|
||||||
${CMAKE_SOURCE_DIR}/cmake.h.in
|
${CMAKE_SOURCE_DIR}/cmake.h.in
|
||||||
${CMAKE_SOURCE_DIR}/cmake.h)
|
${CMAKE_SOURCE_DIR}/cmake.h)
|
||||||
|
|
||||||
ExternalProject_Add (libshared
|
|
||||||
GIT_REPOSITORY "https://git.tasktools.org/scm/tm/libshared.git"
|
|
||||||
GIT_TAG "master"
|
|
||||||
#UPDATE_DISCONNECTED 1 # Needs 3.2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
add_subdirectory (src/commands)
|
add_subdirectory (src/commands)
|
||||||
add_subdirectory (doc)
|
add_subdirectory (doc)
|
||||||
|
@ -67,6 +60,6 @@ set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
|
||||||
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
|
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
|
||||||
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
|
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
|
||||||
"test" "package-config" "src/timew$" "src/libtimew.a"
|
"test" "package-config" "src/timew$" "src/libtimew.a"
|
||||||
"src/commands/libcommands.a" "libshared-prefix"
|
"src/commands/libcommands.a"
|
||||||
"/\\\\.gitignore" "/\\\\.git/" "swp$" "src/gr$")
|
"/\\\\.gitignore" "/\\\\.git/" "swp$" "src/gr$")
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
|
|
@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.8)
|
||||||
include_directories (${CMAKE_SOURCE_DIR}
|
include_directories (${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/src
|
${CMAKE_SOURCE_DIR}/src
|
||||||
${CMAKE_SOURCE_DIR}/src/commands
|
${CMAKE_SOURCE_DIR}/src/commands
|
||||||
|
${CMAKE_SOURCE_DIR}/src/libshared/src
|
||||||
${TIMEW_INCLUDE_DIRS})
|
${TIMEW_INCLUDE_DIRS})
|
||||||
|
|
||||||
set (timew_SRCS Database.cpp Database.h
|
set (timew_SRCS Database.cpp Database.h
|
||||||
|
@ -14,17 +15,34 @@ set (timew_SRCS Database.cpp Database.h
|
||||||
Rules.cpp Rules.h
|
Rules.cpp Rules.h
|
||||||
init.cpp)
|
init.cpp)
|
||||||
|
|
||||||
add_library (timew STATIC ${timew_SRCS})
|
set (libshared_SRCS libshared/src/Args.cpp libshared/src/Args.h
|
||||||
include_directories(${CMAKE_INSTALL_PREFIX}/include)
|
libshared/src/Color.cpp libshared/src/Color.h
|
||||||
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
|
libshared/src/Configuration.cpp libshared/src/Configuration.h
|
||||||
|
libshared/src/Datetime.cpp libshared/src/Datetime.h
|
||||||
|
libshared/src/Duration.cpp libshared/src/Duration.h
|
||||||
|
libshared/src/FS.cpp libshared/src/FS.h
|
||||||
|
libshared/src/JSON.cpp libshared/src/JSON.h
|
||||||
|
libshared/src/Msg.cpp libshared/src/Msg.h
|
||||||
|
libshared/src/Pig.cpp libshared/src/Pig.h
|
||||||
|
libshared/src/RX.cpp libshared/src/RX.h
|
||||||
|
libshared/src/Table.cpp libshared/src/Table.h
|
||||||
|
libshared/src/Timer.cpp libshared/src/Timer.h
|
||||||
|
libshared/src/format.cpp libshared/src/format.h
|
||||||
|
libshared/src/shared.cpp libshared/src/shared.h
|
||||||
|
libshared/src/unicode.cpp libshared/src/unicode.h
|
||||||
|
libshared/src/utf8.cpp libshared/src/utf8.h
|
||||||
|
libshared/src/wcwidth6.cpp)
|
||||||
|
|
||||||
|
add_library (timew STATIC ${timew_SRCS})
|
||||||
|
add_library (libshared STATIC ${libshared_SRCS})
|
||||||
add_executable (timew_executable timew.cpp)
|
add_executable (timew_executable timew.cpp)
|
||||||
add_executable (gr_executable gr.cpp)
|
add_executable (gr_executable gr.cpp)
|
||||||
|
|
||||||
target_link_libraries (timew_executable timew commands shared ${TIMEW_LIBRARIES})
|
target_link_libraries (timew_executable timew commands libshared ${TIMEW_LIBRARIES})
|
||||||
target_link_libraries (gr_executable timew shared ${TIMEW_LIBRARIES})
|
target_link_libraries (gr_executable timew libshared ${TIMEW_LIBRARIES})
|
||||||
|
|
||||||
set_property (TARGET timew_executable PROPERTY OUTPUT_NAME "timew")
|
set_property (TARGET timew_executable PROPERTY OUTPUT_NAME "timew")
|
||||||
set_property (TARGET gr_executable PROPERTY OUTPUT_NAME "gr")
|
set_property (TARGET gr_executable PROPERTY OUTPUT_NAME "gr")
|
||||||
|
|
||||||
install (TARGETS timew_executable DESTINATION bin)
|
install (TARGETS timew_executable DESTINATION bin)
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ cmake_minimum_required (VERSION 2.8)
|
||||||
include_directories (${CMAKE_SOURCE_DIR}
|
include_directories (${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/src
|
${CMAKE_SOURCE_DIR}/src
|
||||||
${CMAKE_SOURCE_DIR}/src/commands
|
${CMAKE_SOURCE_DIR}/src/commands
|
||||||
|
${CMAKE_SOURCE_DIR}/src/libshared/src
|
||||||
${TIMEW_INCLUDE_DIRS})
|
${TIMEW_INCLUDE_DIRS})
|
||||||
include_directories(${CMAKE_INSTALL_PREFIX}/include)
|
|
||||||
|
|
||||||
set (commands_SRCS CmdClear.cpp
|
set (commands_SRCS CmdClear.cpp
|
||||||
CmdConfig.cpp
|
CmdConfig.cpp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue