-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
66 lines (51 loc) · 1.82 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include(CMakeForceCompiler)
include(ExternalProject)
SET(CMAKE_SYSTEM_NAME SegaSaturn)
if (WIN32)
set(SH_ELF_PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\KPIT\\GNUSH v12.02-ELF;Path]/sh-elf/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\KPIT Cummins\\GNUSH v10.02-ELF;Path]/sh-elf/bin")
else (WIN32)
set(SH_ELF_PATHS "")
endif (WIN32)
find_program(SH_ELF_GCC
NAMES sh-elf-gcc
PATHS
${SH_ELF_PATHS})
find_program(SH_ELF_GPP
NAMES sh-elf-g++
PATHS
${SH_ELF_PATHS})
# Specify the cross compiler.
CMAKE_FORCE_C_COMPILER(${SH_ELF_GCC} GNU)
CMAKE_FORCE_CXX_COMPILER(${SH_ELF_GPP} GNU)
SET(CMAKE_FIND_ROOT_PATH /usr/local/share/sh-elf/bin)
option(IAP_WANT_SNDDRV "Build Sound Driver and include in library")
if (IAP_WANT_SNDDRV)
ExternalProject_Add(bin2c
DOWNLOAD_COMMAND ""
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/bin2c
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
INSTALL_COMMAND ""
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin2c)
set(CMAKE_BIN2C "${CMAKE_CURRENT_BINARY_DIR}/bin2c/bin2c")
endif()
PROJECT(iapetus C)
#CONFIGURE_FILE(config.h.cmake config.h)
set(IAPETUS_VERSION_MAJOR 0)
set(IAPETUS_VERSION_MINOR 1)
set(IAPETUS_VERSION_PATCH 0)
set(IAPETUS_VERSION "${IAPETUS_VERSION_MAJOR}.${IAPETUS_VERSION_MINOR}.${IAPETUS_VERSION_PATCH}")
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_PACKAGE_VERSION_MAJOR ${IAPETUS_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${IAPETUS_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${IAPETUS_VERSION_PATCH})
set(CPACK_PACKAGE_VENDOR "Theo Berkau")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "iapetus-${IAPETUS_VERSION}")
include(CPack)
SET(CMAKE_CONFIGURATION_TYPES Release)
set(68K_CMAKE_PLATFORM "${CMAKE_CURRENT_SOURCE_DIR}/Platform/SegaSaturn68K")
add_subdirectory(doc)
add_subdirectory(src)