mirror of https://github.com/AxioDL/nod.git
Refactor of CMake for cleaner dependency handling
This commit is contained in:
parent
77013bbd9f
commit
47322b9496
|
@ -1,8 +1,8 @@
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
||||||
project(nod VERSION 0.1)
|
project(nod VERSION 0.1)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include (CMakePackageConfigHelpers)
|
include (CMakePackageConfigHelpers)
|
||||||
|
@ -15,14 +15,13 @@ endif()
|
||||||
|
|
||||||
if (NOT TARGET logvisor)
|
if (NOT TARGET logvisor)
|
||||||
add_subdirectory(logvisor)
|
add_subdirectory(logvisor)
|
||||||
set(LOGVISOR_INCLUDE_DIR logvisor/include)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(include ${LOGVISOR_INCLUDE_DIR})
|
|
||||||
file(GLOB NOD_HEADERS include/nod/*.h*)
|
file(GLOB NOD_HEADERS include/nod/*.h*)
|
||||||
|
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
add_subdirectory(driver)
|
add_subdirectory(driver)
|
||||||
|
target_include_directories(nod PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||||
install(DIRECTORY include/nod DESTINATION include)
|
install(DIRECTORY include/nod DESTINATION include)
|
||||||
|
|
||||||
set(version_config_file "${PROJECT_BINARY_DIR}/nodConfigVersion.cmake")
|
set(version_config_file "${PROJECT_BINARY_DIR}/nodConfigVersion.cmake")
|
||||||
|
|
|
@ -16,8 +16,9 @@ add_library(nod
|
||||||
nod.cpp
|
nod.cpp
|
||||||
${PLAT_SRCS}
|
${PLAT_SRCS}
|
||||||
${NOD_HEADERS})
|
${NOD_HEADERS})
|
||||||
|
target_link_libraries(nod PUBLIC logvisor)
|
||||||
if(NOT MSVC AND NOT NX)
|
if(NOT MSVC AND NOT NX)
|
||||||
set_source_files_properties(aes.cpp PROPERTIES COMPILE_FLAGS -maes)
|
set_source_files_properties(aes.cpp PROPERTIES COMPILE_FLAGS -maes)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Associate target with export
|
# Associate target with export
|
||||||
|
|
2
logvisor
2
logvisor
|
@ -1 +1 @@
|
||||||
Subproject commit ebe7463e671388902e56084453a464e35389324a
|
Subproject commit a0ef17d895ba655ade171f76a984663639a1d390
|
Loading…
Reference in New Issue