Files
ReUnirand/CMakeLists.txt
2025-02-01 16:53:31 -05:00

26 lines
791 B
CMake

cmake_minimum_required(VERSION 3.10)
project(ReUnirand LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cmake/CPM.cmake)
if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(FATAL_ERROR "In-Source builds are not allowed")
endif()
# Collect header and source files.
file(GLOB_RECURSE HEADERS "include/ReUnirand/*.h")
file(GLOB_RECURSE SOURCES "src/*.cpp")
include_directories("include")
# Create the library. (We only list unirand.cpp explicitly.)
add_library(ReUnirand src/unirand.cpp)
add_executable(ReUnirand-Test src/main.cpp)
set_target_properties(ReUnirand PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(ReUnirand-Test PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(ReUnirand-Test PUBLIC ReUnirand)