Document boost and bison dependencies, clean up detection

This commit is contained in:
Wolfgang Thaller 2015-01-20 00:05:54 +01:00
parent 2268b5f093
commit 41e327debc
3 changed files with 13 additions and 8 deletions

View File

@ -13,21 +13,22 @@ Prerequisites
------------- -------------
- Linux or Mac OS X - Linux or Mac OS X
- boost, if using gcc 4.8 or earlier to compile on Linux - boost
- CMake 2.8 - CMake 2.8
- GCC dependencies: GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+ - GCC dependencies: GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
- bison version 3.0.2 or later
- Apple Universal Interfaces (tested with version 3.1 - see below) - Apple Universal Interfaces (tested with version 3.1 - see below)
- An ancient Mac and/or an emulator. - An ancient Mac and/or an emulator.
For Ubuntu Linux, the following should help a bit: For Ubuntu Linux, the following should help a bit:
sudo apt-get install cmake libgmp-dev libmpfr-dev libmpc-dev sudo apt-get install cmake libgmp-dev libmpfr-dev libmpc-dev libboost-all-dev bison
On a Mac, get the homebrew package manager and: On a Mac, get the homebrew package manager and:
brew install cmake gmp mpfr libmpc brew install cmake gmp mpfr libmpc boost bison
You can also run Retro68 on a PowerMac G4 or G5 running Mac OS 10.4 (Tiger). In theory, you can also run Retro68 on a PowerMac G4 or G5 running Mac OS 10.4 (Tiger).
In that case, get the tigerbrew package manager and In that case, get the tigerbrew package manager and
brew install gcc cmake brew install gcc cmake

View File

@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "--std=c++0x -Wall -Werror=return-type") set(CMAKE_CXX_FLAGS "--std=c++0x -Wall -Werror=return-type")
find_package(Boost COMPONENTS filesystem system) find_package(Boost COMPONENTS filesystem system REQUIRED)
add_library(ResourceFiles add_library(ResourceFiles
ResourceFork.h ResourceFork.cc ResourceFork.h ResourceFork.cc

View File

@ -21,9 +21,11 @@ set(CMAKE_CXX_FLAGS "--std=c++11 -Wall")
find_package(Boost COMPONENTS wave filesystem system thread regex program_options) find_package(Boost COMPONENTS wave filesystem system thread regex program_options)
if(Boost_FOUND) set(CMAKE_PROGRAM_PATH $CMAKE_PROGRAM_PATH "/usr/local/opt/bison/bin")
find_package(BISON 3.0.2)
if(Boost_FOUND AND BISON_FOUND)
find_package(BISON REQUIRED)
include_directories(. ${CMAKE_CURRENT_BINARY_DIR}) include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
@ -68,4 +70,6 @@ install(TARGETS Rez RUNTIME DESTINATION bin)
add_subdirectory(Test) add_subdirectory(Test)
endif(Boost_FOUND) else(Boost_FOUND AND BISON_FOUND)
message(WARNING "Rez compiler will not be built; both boost and Bison 3.0.2 are required")
endif(Boost_FOUND AND BISON_FOUND)