forked from blastrock/pkgj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (32 loc) · 1.09 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
cmake_minimum_required(VERSION 3.6)
if(NOT HOST_BUILD)
# must be done before project()
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
else()
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
endif()
endif()
include("$ENV{VITASDK}/share/vita.cmake" REQUIRED)
endif()
project(pkgj)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
# useful for memory alignment constraints
set(CMAKE_CXX_STANDARD 17)
set(VITA_APP_NAME "PKGj")
set(VITA_TITLEID "PKGJ00000")
set(VITA_VERSION "0.55")
option(PKGI_ENABLE_LOGGING "enables debug logging over udp multicast" OFF)
if(PKGI_ENABLE_LOGGING)
add_definitions(-DPKGI_ENABLE_LOGGING)
endif()
add_definitions(-DPKGI_VERSION="${VITA_VERSION}" -D_GNU_SOURCE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fvisibility=hidden")
if(HOST_BUILD)
include(host.cmake)
else()
include(cross.cmake)
endif()