Build: qualify target support (closes #38)
This commit is contained in:
1 parent
72148da7b2
commit
1335fa86c3
8 files changed
+689
No files matched your search
@@ -45,6 +45,7 @@ set(EXPORT_SET_NAME ${PROJECT_NAME}Targets)
|
||||
include(cmake/Capabilities.cmake)
|
||||
void_probe_capabilities()
|
||||
include(cmake/Module.cmake)
|
||||
include(cmake/Targets.cmake)
|
||||
|
||||
# Modules to configure, with the modules they need (INTERNAL_DEPS, followed
|
||||
# transitively); empty configures every module. OPTIONAL_DEPS are used only
|
||||
@@ -83,6 +84,12 @@ if(VOID_ENABLED_MODULES)
|
||||
endif()
|
||||
|
||||
file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/*)
|
||||
if(_void_selected)
|
||||
# Fail on unsupported target/module combinations before resolving any
|
||||
# dependency, so a browser engine requesting native networking gets the
|
||||
# target message instead of a Boost/OpenSSL one.
|
||||
void_validate_target_modules(${_void_selected})
|
||||
endif()
|
||||
foreach(module_path ${children})
|
||||
if(_void_selected AND NOT module_path IN_LIST _void_selected)
|
||||
continue()
|
||||
@@ -96,6 +103,9 @@ foreach(module_path ${children})
|
||||
endif()
|
||||
endforeach()
|
||||
void_finalize_modules()
|
||||
void_validate_target_modules()
|
||||
void_write_target_manifest(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/void-target-manifest.cmake")
|
||||
void_report_capabilities()
|
||||
if(VOID_ENABLE_TESTING)
|
||||
|
||||
@@ -144,6 +154,7 @@ install(EXPORT ${EXPORT_SET_NAME}
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/void-target-manifest.cmake"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/VoidTesting.cmake"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/VoidTestScanner.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
|
||||
Reference in new issue
Block a user