diff --git a/CMakeLists.txt b/CMakeLists.txt index bcc5bee9c..1a4c17202 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ option(BUILD_MQT_CORE_TESTS "Also build tests for the MQT Core project" ${MQT_CO # try to determine the project version include(cmake/GetVersion.cmake) -get_version() +get_mqt_core_version() project( mqt-core diff --git a/cmake/GetVersion.cmake b/cmake/GetVersion.cmake index 51b12c592..460547d68 100644 --- a/cmake/GetVersion.cmake +++ b/cmake/GetVersion.cmake @@ -11,6 +11,12 @@ # * MQT_CORE_VERSION_FOUND (TRUE if version was found, FALSE otherwise) function(version_from_skbuild) + if(NOT MQT_CORE_MASTER_PROJECT) + message(VERBOSE + "Not the master project. Cannot determine project version from scikit-build-core.") + return() + endif() + if(NOT DEFINED SKBUILD_PROJECT_VERSION) message( VERBOSE @@ -185,7 +191,7 @@ function(version_from_package) CACHE INTERNAL "MQT_CORE_VERSION_FOUND") endfunction() -function(get_version) +function(get_mqt_core_version) # Initialize as not found set(MQT_CORE_VERSION_FOUND FALSE