Blame view

CMakeLists.txt 1.51 KB
0c5b5e5c   Steven de Ridder   Initial commit. d...
1
  cmake_minimum_required(VERSION 3.0)
e0254ed5   Steven de Ridder   adjusted cmakelis...
2
3
4
5
6
7
8
9
10
  project(osdev_qt-bluetooth)
  # ==============================================================================
  # Check to see if we're a submodule or top-repo.
  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}/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}/../submodules/cmake)
0c5b5e5c   Steven de Ridder   Initial commit. d...
11
  else()
e0254ed5   Steven de Ridder   adjusted cmakelis...
12
      message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" )
0c5b5e5c   Steven de Ridder   Initial commit. d...
13
14
  endif()
  
e0254ed5   Steven de Ridder   adjusted cmakelis...
15
  # ==============================================================================
0c5b5e5c   Steven de Ridder   Initial commit. d...
16
  # Check to see if there is versioning information available
e0254ed5   Steven de Ridder   adjusted cmakelis...
17
18
19
20
21
22
  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?" )
0c5b5e5c   Steven de Ridder   Initial commit. d...
23
24
  endif()
  
e0254ed5   Steven de Ridder   adjusted cmakelis...
25
26
27
  # ==============================================================================
  
  
0c5b5e5c   Steven de Ridder   Initial commit. d...
28
29
30
31
32
33
34
35
  include(projectheader)
  project_header(osdev_qt-bluetooth)
  
  add_subdirectory(src)
  add_subdirectory(tests)
  
  # include(packaging)
  # package_component()