-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
44 lines (35 loc) · 1.41 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
cmake_minimum_required(VERSION 3.1)
project(SFMLAudioPlugin)
if(APPLE)
# This has to be before most other options so CMake properly handles the
# compiler variables, it MUST bebefore the project() definition
option(BUILD_UNIVERSAL_BINARIES "Build universal binaries for all architectures supported" ON)
if (NOT CMAKE_OSX_ARCHITECTURES AND BUILD_UNIVERSAL_BINARIES)
if(IOS)
# set the architecture for iOS
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH armv6 armv7 armv7s arm64)
set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")
else (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH i386 x86_64)
set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS Simulator")
endif (${IOS_PLATFORM} STREQUAL "OS")
else(IOS)
# set the architectures for OS X
set (OSXI_ARCH i386 x86_64)
set (CMAKE_OSX_ARCHITECTURES ${OSXI_ARCH} CACHE string "Build architecture for OS X universal binaries")
endif(IOS)
endif (NOT CMAKE_OSX_ARCHITECTURES AND BUILD_UNIVERSAL_BINARIES)
endif(APPLE)
if(WIN32)
add_definitions( -DWIN32 )
endif(WIN32)
if(UNIX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
endif(UNIX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(LuaJIT REQUIRED)
find_package(SFML REQUIRED system audio)
find_package(Gsage REQUIRED)
add_subdirectory(Plugin)