gd-tools/rdricpp/CMakeLists.txt

39 lines
888 B
CMake
Raw Normal View History

2024-02-04 18:24:04 +00:00
# Works with 3.14 and tested through 3.28
cmake_minimum_required(VERSION 3.14...3.28)
project(Rdricpp
VERSION 0.2
DESCRIPTION "Rikaitan Deinflector Reference Implementation in C++."
LANGUAGES CXX)
# Only do these if this is the main project
# Testing only available if this is the main program
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_CXX_EXTENSIONS OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(CTest)
endif()
# FetchContent added in CMake 3.11, downloads during the configure step
# FetchContent_MakeAvailable was added in CMake 3.14; simpler usage
include(FetchContent)
# The compiled library code is here
add_subdirectory(src)
# The executable code is here
add_subdirectory(bin)
# Run tests with make test
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR RDRICPP_TESTING)
AND BUILD_TESTING)
add_subdirectory(tests)
endif()