CMake/Tests/CMakeOnly/TargetScope/Sub/CMakeLists.txt

10 lines
318 B
CMake
Raw Permalink Normal View History

add_library(SubLibLocal UNKNOWN IMPORTED)
add_library(SubLibGlobal UNKNOWN IMPORTED GLOBAL)
add_subdirectory(Sub)
if(NOT TARGET SubLibLocal)
message(FATAL_ERROR "SubLibLocal not visible in own directory")
endif()
if(NOT TARGET SubLibGlobal)
message(FATAL_ERROR "SubLibGlobal not visible in own directory")
endif()