-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
39 lines (31 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8)
project(aaruremote C)
include(CheckIncludeFiles)
include(CheckLibraryExists)
include(TestBigEndian)
set(CMAKE_C_STANDARD 90)
set(MAIN_SOURCES aaruremote.h endian.h hex2bin.c list_devices.c main.c worker.c)
add_library(aaruremotecore ${MAIN_SOURCES})
CHECK_INCLUDE_FILES("endian.h" HAVE_ENDIAN_H)
if (HAVE_ENDIAN_H)
add_definitions(-DHAVE_ENDIAN_H)
endif ()
if (WII)
set(CMAKE_C_FLAGS "-mrvl -mcpu=750 -meabi -mhard-float")
add_definitions(-DGEKKO=1)
include_directories($ENV{DEVKITPRO}/libogc/include/)
add_definitions(-D__BYTE_ORDER=4321)
else ()
if (NOT HAVE_ENDIAN_H AND NOT HAVE_SYS_ENDIAN_H)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if (IS_BIG_ENDIAN)
add_definitions(-D__BYTE_ORDER=4321)
else ()
add_definitions(-D__BYTE_ORDER=1234)
endif ()
endif ()
endif ()
set(AARU_PORTS "linux;wii;win32;freebsd" CACHE STRING "List of ports to build")
foreach (PORT IN LISTS AARU_PORTS)
add_subdirectory(${PORT})
endforeach (PORT)