mirror of
https://github.com/autc04/Retro68.git
synced 2024-05-28 18:41:41 +00:00
Tiger compatibility; most importantly, we want a C99 compiler
This commit is contained in:
parent
d4f3670056
commit
da6426b207
|
@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.3)
|
||||||
find_program(LAUNCH_APPL LaunchAPPL PATH "${CMAKE_INSTALL_PREFIX}/../bin/")
|
find_program(LAUNCH_APPL LaunchAPPL PATH "${CMAKE_INSTALL_PREFIX}/../bin/")
|
||||||
execute_process(COMMAND ${LAUNCH_APPL} --list-emulators
|
execute_process(COMMAND ${LAUNCH_APPL} --list-emulators
|
||||||
OUTPUT_VARIABLE EMULATOR_LIST)
|
OUTPUT_VARIABLE EMULATOR_LIST)
|
||||||
separate_arguments(EMULATOR_LIST)
|
string(REPLACE "\n" ";" EMULATOR_LIST ${EMULATOR_LIST})
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "RetroCarbon")
|
if(CMAKE_SYSTEM_NAME MATCHES "RetroCarbon")
|
||||||
if("carbon" IN_LIST EMULATOR_LIST)
|
if("carbon" IN_LIST EMULATOR_LIST)
|
||||||
|
@ -19,6 +19,7 @@ else()
|
||||||
set(RETRO68_LAUNCH_METHOD NONE CACHE String "How to launch Mac applications (for automated testing)")
|
set(RETRO68_LAUNCH_METHOD NONE CACHE String "How to launch Mac applications (for automated testing)")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RETRO68_TEST_CONFIG "--timeout=10" CACHE String "Options to pass to LaunchAPPL when running tests")
|
set(RETRO68_TEST_CONFIG "--timeout=10" CACHE String "Options to pass to LaunchAPPL when running tests")
|
||||||
|
|
||||||
if(RETRO68_LAUNCH_METHOD MATCHES "NONE")
|
if(RETRO68_LAUNCH_METHOD MATCHES "NONE")
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
cmake_minimum_required(VERSION 3.3)
|
cmake_minimum_required(VERSION 3.3)
|
||||||
project(Retro)
|
project(Retro)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
set(CMAKE_C_STANDARD_REQUIRED TRUE)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES Retro.*)
|
if(CMAKE_SYSTEM_NAME MATCHES Retro.*)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void copyDirectoryRecursively(const fs::path& sourceDir, const fs::path&
|
||||||
for (const auto& dirEnt : fs::recursive_directory_iterator{sourceDir})
|
for (const auto& dirEnt : fs::recursive_directory_iterator{sourceDir})
|
||||||
{
|
{
|
||||||
const auto& path = dirEnt.path();
|
const auto& path = dirEnt.path();
|
||||||
auto relativePathStr = path.lexically_relative(sourceDir);
|
auto relativePathStr = path.string().substr(sourceDir.string().size());
|
||||||
fs::copy(path, destinationDir / relativePathStr);
|
fs::copy(path, destinationDir / relativePathStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ the build directory.
|
||||||
If you're building this on a PowerMac running Mac OS X 10.4, tell the build script
|
If you're building this on a PowerMac running Mac OS X 10.4, tell the build script
|
||||||
to use the gcc you've installed via tigerbrew:
|
to use the gcc you've installed via tigerbrew:
|
||||||
|
|
||||||
../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5
|
../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5
|
||||||
|
|
||||||
### Build options and recompiling
|
### Build options and recompiling
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,11 @@ for ARG in $*; do
|
||||||
CLEAN_AFTER_BUILD=true
|
CLEAN_AFTER_BUILD=true
|
||||||
;;
|
;;
|
||||||
--host-cxx-compiler=*)
|
--host-cxx-compiler=*)
|
||||||
HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS}]="-DCMAKE_CXX_COMPILER=${ARG#*=}"
|
HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_CXX_COMPILER=${ARG#*=}"
|
||||||
|
;;
|
||||||
|
--host-c-compiler=*)
|
||||||
|
HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_C_COMPILER=${ARG#*=}"
|
||||||
|
HOST_C_COMPILER="${ARG#*=}"
|
||||||
;;
|
;;
|
||||||
--help)
|
--help)
|
||||||
usage
|
usage
|
||||||
|
|
Loading…
Reference in New Issue
Block a user