From 41e327debc7ebb83abb9078e3218714519fa5708 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Tue, 20 Jan 2015 00:05:54 +0100 Subject: [PATCH] Document boost and bison dependencies, clean up detection --- README.md | 9 +++++---- ResourceFiles/CMakeLists.txt | 2 +- Rez/CMakeLists.txt | 10 +++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8c7ae0a1b7..5bae63defd 100644 --- a/README.md +++ b/README.md @@ -13,21 +13,22 @@ Prerequisites ------------- - Linux or Mac OS X -- boost, if using gcc 4.8 or earlier to compile on Linux +- boost - CMake 2.8 - 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) - An ancient Mac and/or an emulator. 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: - 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 brew install gcc cmake diff --git a/ResourceFiles/CMakeLists.txt b/ResourceFiles/CMakeLists.txt index 40c984a2df..27eb239a8c 100644 --- a/ResourceFiles/CMakeLists.txt +++ b/ResourceFiles/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required(VERSION 2.8) 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 ResourceFork.h ResourceFork.cc diff --git a/Rez/CMakeLists.txt b/Rez/CMakeLists.txt index e256d59161..9e2a7a73c7 100644 --- a/Rez/CMakeLists.txt +++ b/Rez/CMakeLists.txt @@ -21,9 +21,11 @@ set(CMAKE_CXX_FLAGS "--std=c++11 -Wall") 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}) @@ -68,4 +70,6 @@ install(TARGETS Rez RUNTIME DESTINATION bin) 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)