diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-03-03 13:02:33 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-03-03 13:02:33 +0200 |
commit | 4e4d2c5ce0116a1317ebe564ffb34c38319f3fc1 (patch) | |
tree | 04f75e07ac64236ddc409098152091e40c467112 /CMakeLists.txt | |
parent | Handle empty matrix ID (regression from 9de1ec1) (diff) | |
download | nheko-4e4d2c5ce0116a1317ebe564ffb34c38319f3fc1.tar.xz |
Remove git submodules in favor of cmake's ExternalProject
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ab8a63b..3f0c44e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,13 +45,6 @@ else() find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY) endif() -if (NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/lmdbxx/.git" OR - NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/matrix-structs/.git") - message(WARNING "The git submodules are not available.") - message(STATUS "Running git submodule update --init --recursive ...") - execute_process(COMMAND git submodule update --init --recursive) -endif() - # # Discover Qt dependencies. # @@ -219,10 +212,21 @@ set(SRC_FILES src/main.cc ) +# +# matrix-structs +# +include(${CMAKE_SOURCE_DIR}/cmake/MatrixStructs.cmake) +include_directories(${MATRIX_STRUCTS_INCLUDE_DIRS}) + +# +# lmdbxx +# +include(${CMAKE_SOURCE_DIR}/cmake/LMDBXX.cmake) +include_directories(${LMDBXX_INCLUDE_DIRS}) + include_directories(include) include_directories(include/ui) -include_directories(libs/lmdbxx) include_directories(${LMDB_INCLUDE_DIR}) qt5_wrap_cpp(MOC_HEADERS @@ -317,10 +321,6 @@ endif() qt5_add_resources(LANG_QRC ${_qrc}) qt5_add_resources(QRC resources/res.qrc) -add_subdirectory(libs/matrix-structs) -include_directories(${matrix_structs_SOURCE_DIR}/include) -include_directories(${matrix_structs_SOURCE_DIR}/deps) - set(COMMON_LIBS matrix_structs Qt5::Widgets Qt5::Network Qt5::Concurrent) if(APPVEYOR_BUILD) @@ -342,6 +342,8 @@ else() target_link_libraries (nheko ${NHEKO_LIBS} Qt5::Multimedia) endif() +add_dependencies(nheko MatrixStructs lmdbxx) + if(UNIX AND NOT APPLE) install (TARGETS nheko RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") install (FILES "resources/nheko-16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "nheko.png") |