From 14a19abcc6ebe5625842618c2b2c22843b31adf2 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 17 Jan 2025 06:39:44 +0100 Subject: [PATCH] Move CMAKE_MODULE_PATH to top-level CMakeLists.txt There is no need to assign CMAKE_MODULE_PATH every time macros.cmake is included. --- CMakeLists.txt | 2 ++ cmake/macros.cmake | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb0d608d4..5068971b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,8 @@ option(SD_ASSUME_DATADIR "Assume default directory for speed-dreams-data") set(data_version 2.3.0) include(GNUInstallDirs) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake) + if(SD_ASSUME_DATADIR) set(SD_DATADIR ${CMAKE_INSTALL_DATADIR}/games/speed-dreams-2) set(SD_DATADIR_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/games/speed-dreams-2) diff --git a/cmake/macros.cmake b/cmake/macros.cmake index feaf53a7b..ee9d44da6 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -81,8 +81,6 @@ SET(SD_MANDIR ${CMAKE_INSTALL_MANDIR} CACHE PATH "Place where the manual pages s STRING(REGEX REPLACE "^(.*[^/])/*$" "\\1" SD_LOCALDIR_TMP ${SD_LOCALDIR}) SET(SD_LOCALDIR ${SD_LOCALDIR_TMP}) -SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) - # Configuration options macros. INCLUDE(${CMAKE_CURRENT_LIST_DIR}/options.cmake)