This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.20) | |
project("{PROJECT NAME}" DESCRIPTION "{PROJECT DESCRIPTION}") | |
if (NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | |
message(STATUS "This project has a top-level one called [${CMAKE_PROJECT_NAME}]") | |
else() | |
message(STATUS "This project is a top-level one") | |
endif() | |
# here you can see how instead of writing "SomeLibrary" | |
# we can just use the PROJECT_NAME variable |