CMake: Error out if source directory if src/ instead of top-level dir
This commit is contained in:
@@ -221,7 +221,7 @@ if(NOT EMU_BUILD_NUM)
|
|||||||
set(EMU_BUILD_NUM 0)
|
set(EMU_BUILD_NUM 0)
|
||||||
endif()
|
endif()
|
||||||
if(NOT EMU_COPYRIGHT_YEAR)
|
if(NOT EMU_COPYRIGHT_YEAR)
|
||||||
set(EMU_COPYRIGHT_YEAR 2024)
|
set(EMU_COPYRIGHT_YEAR 2025)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Libasan
|
# Libasan
|
||||||
@@ -230,4 +230,6 @@ if(LIBASAN)
|
|||||||
add_link_options(-fsanitize=address)
|
add_link_options(-fsanitize=address)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_TOP_LEVEL_PROCESSED TRUE)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
# Copyright 2024 Jasmine Iwanek.
|
# Copyright 2024 Jasmine Iwanek.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if(NOT CMAKE_TOP_LEVEL_PROCESSED)
|
||||||
|
message(FATAL_ERROR "Incorrect source directory specified. Delete your build directory and retry with the top-level directory instead")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user