-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (41 loc) · 1.75 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# Black Knight Blockade, a simple game entry for Ludum Dare 25: You are the Villain
#
# Copyright (c) 2013 Mario Liebisch <[email protected]>
#
# This file is part of Black Knight Blockade.
#
# Black Knight Blockade is free software: you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# Black Knight Blockade is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License for more details. You should have received a copy of the GNU
# General Public License along with Black Knight Blockade.
# If not, see <http://www.gnu.org/licenses/>.
#
cmake_minimum_required(VERSION 2.8)
project(bkb)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(SFML COMPONENTS main system audio graphics window REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SFML_INCLUDE_DIR})
file(GLOB SOURCES "source/*.cpp")
if(MSVC)
file(GLOB HEADERS "source/*.h")
list(APPEND SOURCES ${HEADERS})
endif()
if(WIN32)
list(APPEND SOURCES "source/resource.rc")
endif()
if(WIN32 AND NOT MSVC AND (${CMAKE_BUILD_TYPE} MATCHES "Release"))
add_executable(bkb WIN32 ${SOURCES})
else()
add_executable(bkb ${SOURCES})
endif()
target_link_libraries(bkb ${SFML_AUDIO_LIBRARY} ${SFML_GRAPHICS_LIBRARY} ${SFML_WINDOW_LIBRARY} ${SFML_SYSTEM_LIBRARY} ${SFML_MAIN_LIBRARY} ${SFML_DEPENDENCIES})
install(FILES readme.txt license.txt DESTINATION .)
file(GLOB DATA "data/*")
install(FILES ${DATA} DESTINATION data)
install(TARGETS bkb DESTINATION .)