This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
45 lines (39 loc) · 1.56 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
45
cmake_minimum_required(VERSION 3.4.3)
project(psxsdk C ASM)
if(DEFINED PSX)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/libs libs)
endif()
if(NOT DEFINED PSX)
set(CPACK_PACKAGE_NAME "psxsdk")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/license.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Nathan-J. Hirschauer <[email protected]>")
#set(CPACK_GENERATOR "RPM;DEB;TGZ;STGZ")
#set(CPACK_SOURCE_GENERATOR "RPM;TGZ;STGZ")
set(CPACK_GENERATOR "STGZ")
set(CPACK_SOURCE_GENERATOR "STGZ")
set(CPACK_IGNORE_FILES "/\.git/;\.swp\$;\.#;/#")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "PSX SDK built using CMake")
set(CPACK_PACKAGE_NAME "psxsdk")
set(CPACK_PACKAGE_RELOCATABLE "true")
set(CPACK_PACKAGE_VENDOR "psxsdk project")
set(CPACK_RPM_PACKAGE_SOURCES "ON")
set(CPACK_SET_DESTDIR "OFF")
set(CPACK_SOURCE_IGNORE_FILES "/\.git/;\.swp\$;\.#;/#")
include(CPack)
# GCC Toolchain
add_subdirectory(toolchain toolchain)
# Host tools
add_subdirectory(tools tools)
include(ExternalProject)
ExternalProject_Get_Property(gcc INSTALL_DIR)
ExternalProject_Add(psxsdk
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
DEPENDS gcc
BUILD_ALWAYS TRUE
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/
-DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_LIST_DIR}/toolchain/share/cmake/Modules
-DCMAKE_SYSROOT:PATH=${INSTALL_DIR}
-DCMAKE_SYSTEM_NAME:STRING=psx
)
endif()