-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 968 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.1)
project(JonasArcadeProject)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
#setting to user c++ 11
set(CMAKE_CXX_FLAGS "-std=c++11")
#setting a name to executable
set(EXECUTABLE_NAME "JonasArcade")
#including dir
include_directories("${PROJECT_SOURCE_DIR}/src")
#colocando para compilar os arquivos sem pastas
file(GLOB SRCMAIN "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB CORESRCS "${PROJECT_SOURCE_DIR}/src/core/*.cpp")
file(GLOB PONGSRCS "${PROJECT_SOURCE_DIR}/src/pong/*.cpp")
add_executable( ${EXECUTABLE_NAME}
${SRCMAIN}
${CORESRCS}
${PONGSRCS})
#findind SLD2
find_package(SFML 2 COMPONENTS system audio graphics window REQUIRED)
#adding libs to executable
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIRS})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin)