-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
81 lines (64 loc) · 3.05 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
PROJECT (gameandwatch)
cmake_minimum_required(VERSION 2.8)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "gameandwatch")
SET(CPACK_PACKAGE_VENDOR "Rangel Reale")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Rangel Reale <[email protected]>")
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "3")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
#SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "")
#INCLUDE(CPack)
SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
SET (BASE_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/include)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
include_directories(${CMAKE_SOURCE_DIR}/include)
OPTION ( WITH_DEVELDEVICES "Enable development devices" OFF )
add_definitions(-DGW_USE_ZDATA)
#-----------------------------------------------------------------------------
# Let's use the highest warning level.
#-----------------------------------------------------------------------------
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")
# Use the highest warning level for visual studio.
IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
STRING(REGEX REPLACE "/W[0-4]" "/W3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ELSE(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
ENDIF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
IF(CMAKE_C_FLAGS MATCHES "/W[0-4]")
STRING(REGEX REPLACE "/W[0-4]" "/W3" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
ELSE(CMAKE_C_FLAGS MATCHES "/W[0-4]")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
ENDIF(CMAKE_C_FLAGS MATCHES "/W[0-4]")
# Disable deprecation warnings for standard C functions in VS2005 and later
IF(CMAKE_COMPILER_2005)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
ENDIF(CMAKE_COMPILER_2005)
ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)")
IF(CMAKE_BUILD_TOOL MATCHES "make")
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
IF(NOT CMAKE_C_FLAGS MATCHES "-Wall")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Wall")
ENDIF(CMAKE_BUILD_TOOL MATCHES "make")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF()
Find_Package ( SDL REQUIRED )
Find_Package ( SDL_image REQUIRED )
Find_Package ( SDL_mixer REQUIRED )
Find_Package ( SDL_ttf REQUIRED )
Find_Package ( SDL_gfx REQUIRED )
find_package( ZLIB REQUIRED )
Find_Package ( zziplib REQUIRED )
#-----------------------------------------------------------------------------
add_subdirectory(src)