From 5594c4fbc8b1bbe64fd8fa201805cc15197ba9b5 Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Wed, 3 Feb 2021 18:34:53 +0000 Subject: [PATCH] Fix for in-place builds. Which are not recommended anyway. Signed-off-by: Andrea Odetti --- source/frontends/common2/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/frontends/common2/CMakeLists.txt b/source/frontends/common2/CMakeLists.txt index 1ba2c12f..8028b16b 100644 --- a/source/frontends/common2/CMakeLists.txt +++ b/source/frontends/common2/CMakeLists.txt @@ -39,6 +39,10 @@ target_link_libraries(common2 PUBLIC ) file(RELATIVE_PATH ROOT_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}) +if (NOT DEFINED ${ROOT_PATH}) + # if the 2 paths are the same + set(ROOT_PATH "./") +endif() file(RELATIVE_PATH SHARE_PATH ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DATADIR}/applewin) configure_file(config.h.in config.h)