Last active
March 10, 2024 21:14
-
-
Save Nircek/7cef59c7ff730d4a048def3cc5ac2085 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.5.1..3.28) | |
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | |
set(CMAKE_DISABLE_SOURCE_CHANGES ON) | |
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") | |
message(FATAL_ERROR "In-source builds are not allowed.") | |
endif() | |
project( | |
ProjectName | |
VERSION 0.0 | |
LANGUAGES CXX) | |
set(CMAKE_BUILD_TYPE Debug) # Release | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall -Wextra") | |
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall") | |
set(INCLUDES ${PROJECT_SOURCE_DIR}/include) | |
file(GLOB_RECURSE SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp") | |
include_directories(${INCLUDES}) | |
add_executable(${PROJECT_NAME} main.cpp ${SOURCES}) | |
# [[ | |
find_package(GSL REQUIRED) | |
target_link_libraries(${PROJECT_NAME} GSL::gsl GSL::gslcblas) | |
# ]] | |
# [[ | |
find_package( | |
SFML 2.6 | |
COMPONENTS system window graphics audio | |
REQUIRED) | |
target_link_libraries(${PROJECT_NAME} sfml-system sfml-window sfml-graphics | |
sfml-audio) | |
# ]] | |
# TODO: testing | |
# TODO: docs generating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment