-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (24 loc) · 930 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
cmake_minimum_required(VERSION 2.8)
PROJECT(nesemu)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/src")
INCLUDE_DIRECTORIES("/usr/include/SDL")
MESSAGE("CXX Compiler is called: ${CMAKE_CXX_COMPILER}")
IF(CMAKE_CXX_COMPILER MATCHES ".*clang.*")
SET(CMAKE_COMPILER_IS_CLANGXX 1)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
MESSAGE("Using GCC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ADD_DEFINITIONS("-std=c++0x")
ELSEIF(CMAKE_COMPILER_IS_CLANGXX)
MESSAGE("Using Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ADD_DEFINITIONS("-std=c++11")
ELSE()
MESSAGE("Unsure about compiler! Did you set \"CXX\"? Trying to use sane defaults...")
ADD_DEFINITIONS("-std=c++11")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
SET(LINKER_LANGUAGE CXX)
ADD_SUBDIRECTORY(src)