Blame view

CMakeLists.txt 1.44 KB
fe12aa6a   Steven de Ridder   Initial commit. d...
1
  cmake_minimum_required(VERSION 3.0)
f676d89b   Steven de Ridder   Updated CMakeList...
2
3
4
5
6
  project(osdev_dbconnector)
  # ==============================================================================
  # Check to see if we're a submodule or top-repo.
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
      message( STATUS "Looks like we're a single module" )
fe12aa6a   Steven de Ridder   Initial commit. d...
7
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
f676d89b   Steven de Ridder   Updated CMakeList...
8
9
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
      message( STATUS "Looks like we're a submodule" )
fe12aa6a   Steven de Ridder   Initial commit. d...
10
11
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
  else()
f676d89b   Steven de Ridder   Updated CMakeList...
12
      message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" )
fe12aa6a   Steven de Ridder   Initial commit. d...
13
14
  endif()
  
f676d89b   Steven de Ridder   Updated CMakeList...
15
  # ==============================================================================
fe12aa6a   Steven de Ridder   Initial commit. d...
16
  # Check to see if there is versioning information available
f676d89b   Steven de Ridder   Updated CMakeList...
17
18
19
20
21
22
  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)
  else()
      message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" )
fe12aa6a   Steven de Ridder   Initial commit. d...
23
24
  endif()
  
f676d89b   Steven de Ridder   Updated CMakeList...
25
26
  # ==============================================================================
  
b78cfd45   Steven de Ridder   Qt6 / c++17 changes.
27
28
  set(CMAKE_CXX_STANDARD 17)
  
fe12aa6a   Steven de Ridder   Initial commit. d...
29
30
31
32
33
34
  include(projectheader)
  project_header(osdev_dbconnector)
  
  add_subdirectory(src)
  add_subdirectory(tests)
  
f676d89b   Steven de Ridder   Updated CMakeList...
35
36
  include(packaging)
  package_component()