Commit 80c0744192036b1b5086334865d3bc725bbfa997
1 parent
78c34394
adjusted cmakelists paths to find the subdirectory folder.
Showing
2 changed files
with
16 additions
and
16 deletions
CMakeLists.txt
@@ -2,22 +2,22 @@ cmake_minimum_required(VERSION 3.0) | @@ -2,22 +2,22 @@ cmake_minimum_required(VERSION 3.0) | ||
2 | project(osdev_dbconnector) | 2 | project(osdev_dbconnector) |
3 | # ============================================================================== | 3 | # ============================================================================== |
4 | # Check to see if we're a submodule or top-repo. | 4 | # Check to see if we're a submodule or top-repo. |
5 | -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | 5 | +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake) |
6 | message( STATUS "Looks like we're a single module" ) | 6 | message( STATUS "Looks like we're a single module" ) |
7 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
8 | -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) | 7 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake) |
8 | +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) | ||
9 | message( STATUS "Looks like we're a submodule" ) | 9 | message( STATUS "Looks like we're a submodule" ) |
10 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) | 10 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) |
11 | else() | 11 | else() |
12 | message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) | 12 | message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) |
13 | endif() | 13 | endif() |
14 | 14 | ||
15 | # ============================================================================== | 15 | # ============================================================================== |
16 | # Check to see if there is versioning information available | 16 | # Check to see if there is versioning information available |
17 | -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/versioning) | ||
18 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/versioning/cmake) | ||
19 | -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../versioning) | ||
20 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../versioning/cmake) | 17 | +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning) |
18 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning/cmake) | ||
19 | +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning) | ||
20 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning/cmake) | ||
21 | else() | 21 | else() |
22 | message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) | 22 | message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) |
23 | endif() | 23 | endif() |
src/CMakeLists.txt
1 | cmake_minimum_required(VERSION 3.12) | 1 | cmake_minimum_required(VERSION 3.12) |
2 | # ============================================================================== | 2 | # ============================================================================== |
3 | # Check to see if we're a submodule or top-repo. | 3 | # Check to see if we're a submodule or top-repo. |
4 | -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) | 4 | +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) |
5 | message( STATUS "Looks like we're a single module" ) | 5 | message( STATUS "Looks like we're a single module" ) |
6 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) | ||
7 | -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) | 6 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake) |
7 | +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/cmake) | ||
8 | message( STATUS "Looks like we're a submodule" ) | 8 | message( STATUS "Looks like we're a submodule" ) |
9 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) | 9 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/cmake) |
10 | else() | 10 | else() |
11 | message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) | 11 | message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" ) |
12 | endif() | 12 | endif() |
13 | 13 | ||
14 | # ============================================================================== | 14 | # ============================================================================== |
15 | # Check to see if there is versioning information available | 15 | # Check to see if there is versioning information available |
16 | -if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../versioning) | ||
17 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../versioning/cmake) | ||
18 | -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../versioning) | ||
19 | - LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../versioning/cmake) | 16 | +if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning) |
17 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning/cmake) | ||
18 | +elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/versioning) | ||
19 | + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/versioning/cmake) | ||
20 | else() | 20 | else() |
21 | message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) | 21 | message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" ) |
22 | endif() | 22 | endif() |