cmake_minimum_required(VERSION 3.16) project(ojl_bimap VERSION 0.0.1 LANGUAGES CXX) #TODO: does this project require C++ 20? Then that should be part of the compile features of the targets set(CMAKE_CXX_STANDARD 20) include(GNUInstallDirs) # Define target add_library(bimap INTERFACE) add_library(ojl::bimap ALIAS bimap) target_include_directories(bimap INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) target_sources(bimap INTERFACE FILE_SET HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/include/ojl FILES ${PROJECT_SOURCE_DIR}/include/ojl/bimap.hpp ) add_subdirectory(samples) option(DOWNLOAD_DEPS "Download unsatisfied dependencies using FetchContent" ON) option(BUILD_TESTS "Build tests" ON) if (BUILD_TESTS) if (DOWNLOAD_DEPS) include(cmake/fetch_catch2.cmake) endif() enable_testing() add_subdirectory(test) endif() # Install include(cmake/install_bimap.cmake)