move dependencies to use pkg
This commit is contained in:
parent
97cd3e988d
commit
9f23a5f7c0
5 changed files with 46 additions and 5 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "src/configparser"]
|
|
||||||
path = src/configparser
|
|
||||||
url = https://git.patrickbrosi.de/patrick/configparser
|
|
5
.pkg
5
.pkg
|
@ -3,6 +3,11 @@
|
||||||
branch=add-propper-cmake-project-definition
|
branch=add-propper-cmake-project-definition
|
||||||
commit=69dcdbf392b30777dbfc943c6ca512f33df8eac6
|
commit=69dcdbf392b30777dbfc943c6ca512f33df8eac6
|
||||||
|
|
||||||
|
[config-parser]
|
||||||
|
url=git@github.com:vesavlad/config-parser.git
|
||||||
|
branch=master
|
||||||
|
commit=f96586a5522312fc4d1d8aa67cc5b7ec9039a825
|
||||||
|
|
||||||
[pfxml]
|
[pfxml]
|
||||||
url=git@github.com:patrickbr/pfxml.git
|
url=git@github.com:patrickbr/pfxml.git
|
||||||
branch=master
|
branch=master
|
||||||
|
|
40
cmake/pkg.cmake
Normal file
40
cmake/pkg.cmake
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
set(pkg-bin "${CMAKE_BINARY_DIR}/dl/pkg")
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
set(pkg-url "pkg")
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
|
set(pkg-url "pkg.exe")
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
|
set(pkg-url "pkgosx")
|
||||||
|
else()
|
||||||
|
message(STATUS "Not downloading pkg tool. Using pkg from PATH.")
|
||||||
|
set(pkg-bin "pkg")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (pkg-url)
|
||||||
|
if (NOT EXISTS ${pkg-bin})
|
||||||
|
message(STATUS "Downloading pkg binary from https://github.com/motis-project/pkg/releases/latest/download/${pkg-url}")
|
||||||
|
file(DOWNLOAD "https://github.com/motis-project/pkg/releases/latest/download/${pkg-url}" ${pkg-bin})
|
||||||
|
if (UNIX)
|
||||||
|
execute_process(COMMAND chmod +x ${pkg-bin})
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "Pkg binary located in project.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "${pkg-bin} -l -h -f")
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${pkg-bin} -l -h -f
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/deps")
|
||||||
|
add_subdirectory(deps)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_property(
|
||||||
|
DIRECTORY
|
||||||
|
APPEND
|
||||||
|
PROPERTY CMAKE_CONFIGURE_DEPENDS
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/.pkg"
|
||||||
|
)
|
|
@ -10,5 +10,4 @@ include_directories(
|
||||||
|
|
||||||
add_subdirectory(util)
|
add_subdirectory(util)
|
||||||
add_subdirectory(pfaedle)
|
add_subdirectory(pfaedle)
|
||||||
add_subdirectory(configparser)
|
|
||||||
add_subdirectory(shapevl)
|
add_subdirectory(shapevl)
|
||||||
|
|
|
@ -17,7 +17,7 @@ configure_file (
|
||||||
|
|
||||||
add_executable(pfaedle ${pfaedle_main})
|
add_executable(pfaedle ${pfaedle_main})
|
||||||
add_library(pfaedle_dep ${pfaedle_SRC})
|
add_library(pfaedle_dep ${pfaedle_SRC})
|
||||||
target_link_libraries(pfaedle_dep PRIVATE ad_cppgtfs pfxml)
|
target_link_libraries(pfaedle_dep PRIVATE ad_cppgtfs pfxml configparser)
|
||||||
|
|
||||||
include_directories(pfaedle_dep PUBLIC ${PROJECT_SOURCE_DIR}/src/cppgtfs/src)
|
include_directories(pfaedle_dep PUBLIC ${PROJECT_SOURCE_DIR}/src/cppgtfs/src)
|
||||||
target_link_libraries(pfaedle pfaedle_dep util configparser -lpthread ${LIBZIP_LIBRARY})
|
target_link_libraries(pfaedle pfaedle_dep util configparser -lpthread ${LIBZIP_LIBRARY})
|
||||||
|
|
Loading…
Reference in a new issue