forked from nba-emu/NanoBoyAdvance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 946 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 2.8)
# Must be set before project
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()
project(NanoboyAdvance CXX)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
option(FRONTEND_QT "Enable Qt5 frontend" ON)
option(FRONTEND_SDL "Enable SDL2 frontend" ON)
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast")
option(PROFILE_GPROF "Profile with gprof" OFF)
if (PROFILE)
add_definitions(-pg)
set(CMAKE_EXE_LINKER_FLAGS -pg)
endif()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
add_subdirectory(source)