-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
37 lines (27 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.10)
project(lan7430-config LANGUAGES CXX VERSION 1.2.0)
set(_lib lib CACHE STRING "Basename of the library-directory")
set(_bin bin CACHE STRING "Basename of the bin-directory")
set(_include include CACHE STRING "Basename of the include-directory")
# Set the OUTPUT dirs
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(TEST_REPORT_DIRECTORY ${CMAKE_BINARY_DIR}/reports)
file(MAKE_DIRECTORY ${TEST_REPORT_DIRECTORY})
include(cmake/TestSettings.cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
option(ENABLE_TESTING "Enable Test Builds" ON)
if(ENABLE_TESTING)
enable_testing()
message("Building Tests.")
endif()
configure_file(
${CMAKE_SOURCE_DIR}/src/include/version.hpp.in
${CMAKE_BINARY_DIR}/generated/version.hpp
)
include_directories(${CMAKE_BINARY_DIR}/generated)
add_subdirectory(src)