-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (27 loc) · 920 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
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.29)
project(sdlTemplateC_)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(SDL2_PATH "${CMAKE_SOURCE_DIR}/SDL2-2.30.9/x86_64-w64-mingw32")
set(SDL2_INCLUDE_DIR "${SDL2_PATH}/include")
set(SDL2_LIB_DIR "${SDL2_PATH}/lib")
find_package(SDL2 REQUIRED)
add_executable(${PROJECT_NAME} src/main.cpp
src/System.cpp
src/System.h
src/Session.cpp
src/Session.h
src/Sprite.cpp
src/Sprite.h
include/Constants.h
)
include_directories(${SDL2_INCLUDE_DIR} include)
set(SDL2_IMAGE_LIBRARY "${SDL2_LIB_DIR}/libSDL2_image.dll.a")
set(SDL2_TTF_LIBRARY "${SDL2_LIB_DIR}/libSDL2_ttf.dll.a")
set(SDL2_MIXER_LIBRARY "${SDL2_LIB_DIR}/libSDL2_mixer.dll.a")
target_link_libraries(${PROJECT_NAME}
${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARY}
${SDL2_TTF_LIBRARY}
${SDL2_MIXER_LIBRARY}
)