From 80c0744192036b1b5086334865d3bc725bbfa997 Mon Sep 17 00:00:00 2001 From: Steven de Ridder Date: Mon, 31 Jan 2022 11:05:32 +0100 Subject: [PATCH] adjusted cmakelists paths to find the subdirectory folder. --- CMakeLists.txt | 16 ++++++++-------- src/CMakeLists.txt | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fd403f..6d68692 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,22 +2,22 @@ cmake_minimum_required(VERSION 3.0) project(osdev_dbconnector) # ============================================================================== # Check to see if we're a submodule or top-repo. -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake) message( STATUS "Looks like we're a single module" ) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake) +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) message( STATUS "Looks like we're a submodule" ) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) else() message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) endif() # ============================================================================== # Check to see if there is versioning information available -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/versioning) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/versioning/cmake) -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../versioning) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../versioning/cmake) +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning/cmake) +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning/cmake) else() message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a367dc3..a8ed916 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,22 +1,22 @@ cmake_minimum_required(VERSION 3.12) # ============================================================================== # Check to see if we're a submodule or top-repo. -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) message( STATUS "Looks like we're a single module" ) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/cmake) message( STATUS "Looks like we're a submodule" ) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/cmake) else() message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) endif() # ============================================================================== # Check to see if there is versioning information available -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../versioning) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../versioning/cmake) -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../versioning) - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../versioning/cmake) +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning/cmake) +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/versioning) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/versioning/cmake) else() message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) endif() -- libgit2 0.21.4