Only depend on protolib when it is not build with norm

pull/15/head
Mark Jan van Kampen 2021-01-16 11:16:25 +01:00
parent 6a47beee63
commit 30e5dfab53
No known key found for this signature in database
GPG Key ID: 942C8E0E0D996934
2 changed files with 5 additions and 2 deletions

View File

@ -45,6 +45,7 @@ if(NOT protokit_FOUND)
GIT_TAG ${NORM_PROTOKIT_GIT_TAG}
)
FetchContent_MakeAvailable(protokit)
set(NORM_PROTOKIT_INCLUDED 1)
endif()
# List header files

View File

@ -4,7 +4,9 @@ include(GNUInstallDirs)
include(CMakeFindDependencyMacro)
# Same syntax as find_package
find_dependency(protokit REQUIRED)
if(NOT @NORM_PROTOKIT_INCLUDED@)
find_dependency(protokit REQUIRED)
endif()
# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/normTargets.cmake")