-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (21 loc) · 955 Bytes
/
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
cmake_minimum_required(VERSION 3.7...3.27)
project(Neco-Arc-DVD-Logo
VERSION 1.2
DESCRIPTION "DVD Logo screensaver using SFML, but instead of the DVD Logo, we have Neco-Arc!"
LANGUAGES CXX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.x)
FetchContent_MakeAvailable(SFML)
add_executable(Neco-Arc-DVD-Logo src/main.cpp src/neco.cpp)
target_link_libraries(Neco-Arc-DVD-Logo PRIVATE sfml-graphics sfml-system sfml-window sfml-audio)
target_compile_features(Neco-Arc-DVD-Logo PRIVATE cxx_std_17)
if(WIN32)
add_custom_command(
TARGET CMakeSFMLProject
COMMENT "Copy OpenAL DLL"
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:CMakeSFMLProject>
VERBATIM)
endif()