2012-04-24 03:22:36 +02:00
|
|
|
# Copyright 2012 Wolfgang Thaller.
|
|
|
|
#
|
|
|
|
# This file is part of Retro68.
|
|
|
|
#
|
|
|
|
# Retro68 is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Retro68 is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Retro68. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2012-04-06 00:45:04 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2012-04-06 01:43:44 +02:00
|
|
|
project(Retro)
|
2012-04-06 20:54:45 +02:00
|
|
|
|
2015-10-07 00:03:28 +02:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES Retro.*)
|
2015-07-20 21:38:01 +02:00
|
|
|
|
2015-08-26 22:13:21 +02:00
|
|
|
|
|
|
|
set( REZ_TEMPLATES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libretro)
|
2015-07-20 21:38:01 +02:00
|
|
|
include(add_application)
|
|
|
|
|
2015-10-08 22:44:18 +02:00
|
|
|
string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSLOWER)
|
|
|
|
configure_file(cmake/${SYSLOWER}.toolchain.cmake.in cmake/${SYSLOWER}.toolchain.cmake @ONLY)
|
2015-07-20 21:38:01 +02:00
|
|
|
install(DIRECTORY cmake/ DESTINATION cmake FILES_MATCHING PATTERN "*.cmake")
|
2015-10-08 22:44:18 +02:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/${SYSLOWER}.toolchain.cmake DESTINATION cmake)
|
2015-07-20 21:38:01 +02:00
|
|
|
|
2012-04-06 00:45:04 +02:00
|
|
|
add_subdirectory(libretro)
|
2014-09-30 11:21:08 +02:00
|
|
|
|
|
|
|
# add library path so that GCC picks up the freshly-built libretro
|
|
|
|
link_directories(${CMAKE_CURRENT_BINARY_DIR}/libretro)
|
2015-07-17 21:07:03 +02:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libretro)
|
2015-07-21 00:09:06 +02:00
|
|
|
set(REZ_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libretro:${CMAKE_INSTALL_PREFIX}/RIncludes" )
|
2015-07-20 21:38:01 +02:00
|
|
|
|
2014-09-27 17:21:03 +02:00
|
|
|
add_subdirectory(Console)
|
2015-07-16 20:57:34 +02:00
|
|
|
add_subdirectory(Samples/HelloWorld)
|
2015-10-08 22:44:18 +02:00
|
|
|
add_subdirectory(TestApps)
|
|
|
|
add_subdirectory(Samples/Dialog)
|
2015-10-07 00:03:28 +02:00
|
|
|
add_subdirectory(Samples/Raytracer)
|
2015-09-08 18:05:00 +02:00
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
|
|
|
add_subdirectory(Samples/Launcher)
|
2015-07-18 01:14:43 +02:00
|
|
|
add_subdirectory(Samples/SystemExtension)
|
2015-09-01 00:04:20 +02:00
|
|
|
endif()
|
2015-07-21 00:09:06 +02:00
|
|
|
|
2012-04-06 20:54:45 +02:00
|
|
|
else()
|
2015-07-16 01:26:11 +02:00
|
|
|
|
2015-07-20 21:38:01 +02:00
|
|
|
set(RETRO68_ROOT ${CMAKE_INSTALL_PREFIX})
|
2015-07-21 00:09:06 +02:00
|
|
|
configure_file(cmake/intree.toolchain.cmake.in cmake/intree.toolchain.cmake @ONLY)
|
2015-08-31 01:17:52 +02:00
|
|
|
configure_file(cmake/intreeppc.toolchain.cmake.in cmake/intreeppc.toolchain.cmake @ONLY)
|
2015-10-07 00:03:28 +02:00
|
|
|
configure_file(cmake/intreecarbon.toolchain.cmake.in cmake/intreecarbon.toolchain.cmake @ONLY)
|
2015-07-16 01:26:11 +02:00
|
|
|
|
2014-10-28 22:28:03 +01:00
|
|
|
add_subdirectory(ResourceFiles)
|
2012-04-06 20:54:45 +02:00
|
|
|
add_subdirectory(MakeAPPL)
|
2014-10-05 23:52:34 +02:00
|
|
|
add_subdirectory(Rez)
|
2017-04-15 23:31:17 +02:00
|
|
|
add_subdirectory(ConvertObj)
|
2015-08-30 16:07:49 +02:00
|
|
|
add_subdirectory(PEFTools)
|
2015-08-30 11:45:15 +02:00
|
|
|
|
2012-04-08 00:29:54 +02:00
|
|
|
endif()
|