build: move higher level CMake directives to top of file
This commit is contained in:
parent
6766c75243
commit
c1f19faba4
@ -7,13 +7,24 @@ set(CMAKE_CXX_STANDARD 20)
|
|||||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
include (nc)
|
include (nc)
|
||||||
|
|
||||||
include_directories(.)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
add_library(libemory
|
option (TESTS "enable unit testing" ON)
|
||||||
acl.cpp
|
if (TESTS)
|
||||||
acl.hpp
|
enable_testing ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
include_directories(.)
|
||||||
|
|
||||||
|
add_subdirectory(cruft/util)
|
||||||
|
add_subdirectory(cruft/crypto)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
list(APPEND libemory_sources
|
||||||
emory/chunk/fwd.cpp
|
emory/chunk/fwd.cpp
|
||||||
emory/chunk/fwd.hpp
|
emory/chunk/fwd.hpp
|
||||||
emory/chunk/map.cpp
|
emory/chunk/map.cpp
|
||||||
@ -38,20 +49,20 @@ add_library(libemory
|
|||||||
emory/store/repo.hpp
|
emory/store/repo.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(libemory cruft acl)
|
|
||||||
set_target_properties(libemory PROPERTIES OUTPUT_NAME emory)
|
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
###############################################################################
|
pkg_check_modules(ACL REQUIRED IMPORTED_TARGET libacl)
|
||||||
option (TESTS "enable unit testing" ON)
|
list (APPEND libemory_sources
|
||||||
if (TESTS)
|
acl.cpp
|
||||||
enable_testing ()
|
acl.hpp
|
||||||
|
)
|
||||||
|
list (APPEND libemory_libs PkgConfig::ACL)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
add_library(libemory ${libemory_sources})
|
||||||
|
|
||||||
###############################################################################
|
target_link_libraries(libemory cruft ${libemory_libs})
|
||||||
add_subdirectory(cruft/util)
|
set_target_properties(libemory PROPERTIES OUTPUT_NAME emory)
|
||||||
add_subdirectory(cruft/crypto)
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
2
cmake
2
cmake
@ -1 +1 @@
|
|||||||
Subproject commit bf694b3085fa97c2f7f94473b652f84f28048d52
|
Subproject commit 60a1dc65ef41e1d18e283dba48c993aeee629c00
|
Loading…
Reference in New Issue
Block a user