myx-cmake-example-features/cmake/myx/backports/TopLevelProject.cmake
2022-10-06 15:22:57 +03:00

11 lines
196 B
CMake

include_guard(GLOBAL)
if(${CMAKE_VERSION} VERSION_LESS 3.21)
get_property(nt DIRECTORY PROPERTY PARENT_DIRECTORY)
if(NOT nt)
set(PROJECT_IS_TOP_LEVEL true)
endif()
unset(nt)
endif()