To build natively on macOS, without using Xcode, you will need a set of libraries set up. This guide assumes you already have the following installed:
- How To Link Library File Cmake Clion Mac Os Download
- How To Link Library File Cmake Clion Mac Os Free
- How To Link Library File Cmake Clion Mac Os 10
Apr 03, 2019 “Config CMake OpenCV for CLion” is published by Nhan Cao in beesightsoft. You may need to set OpenCVDIR variable # to the absolute path to the directory containing OpenCVConfig.cmake file.
- a copy of the game files, downloaded onto your machine.
- OS X Developer Tools
- Homebrew / MacPorts / Fink
- Optional: Xcode
Installing libraries
- CMake » 3.2.3 Documentation ». Or addlibrary. See the targetlinklibraries. The targetlinklibraries command should be preferred whenever possible. Library dependencies are chained automatically, so directory-wide specification of link libraries is rarely needed.
- You first need to tell cmake where to find the library (findlibrary), and only then you can use the result from findlibrary in targetlinklibraries findlibrary takes a PATHS argument which you can use to tell cmake where to look.
We'll install the libraries OpenRCT2 depends on through a package manager using the Terminal. We will be using Homebrew in the example below, but the equivalent command for MacPorts and Fink should look pretty similar.
Building OpenRCT2
Navigate to the directory OpenRCT2 is in (
cd
), then make a build directory and invoke cmake
:If any libraries are missing, you will see an error message. Adjust as needed or check out the
Troubleshooting
section below.Once all errors have been fixed we can start building:Now, before executing the game, link the just installed openrct2 data folder to the current directory to help
openrct2
find it. Then run the game.The game will ask for the RCT2 installation path and will build object indices the first time it is started.
After the first install, you can build the
openrct2
binaries, no install required:Troubleshooting
Problem 1: When running cmake, I get the error -- No package 'openssl' found
https://everservers325.weebly.com/blog/itunes-library-files-mac. Try out both solutions in problem 2
Problem 2: When running cmake or make, I get some other weird error involving openssl
Solution 1
First check if you actually built openssl for both the i386 and x86_64 architectures by running the following command, replacing the openssl version with the version you installed:
This should output
If only i386 or x86_64 are listed, then you will need to run
brew reinstall openssl --universal
. Default folders system library frameworks folders mac mojave.How To Link Library File Cmake Clion Mac Os Download
Solution 2
If you are sure the library is built for both architectures, it is possible that the build script is using OS X's version of openssl instead of the one installed by brew.To fix this run:
Anything that needs to build against openssl will use brew's version now.If you want to undo this in the future, you can always run
brew unlink openssl
.Problem 3: When running cmake, I get the error -- No package 'gl' found
Solution
Python mac dynamic library java. The reason this is happening is because pkg-config (run by cmake) is not finding a
gl.pc
file.To solve this we will create our own gl.pc file and tell pkg-config where to find it.First create a pkgconfig folder in the directory where you cloned OpenRCT:
Using your favourite editor, create a file called
gl.pc
with the following content:![Clion Clion](/uploads/1/3/3/9/133908091/789935443.png)
Now tell pkg-config where to find this file and go back to the build directory:
You should find that cmake will now find the gl package.
Problem 4: When running cmake, I get the error ld: library not found for -lSDL2
Solution
It is possible that
brew
was unable to create the relevant symlinks for SDL2 due to permissions problems. To fix this, do the following.If this doesn't work, chances are
/usr/local/lib
isn't in your LIBRARY_PATH
. To fix this, add the following line to your ~/.bash_profile
and then restart the Terminal.export LIBRARY_PATH='$LIBRARY_PATH:/usr/local/lib'
Mac yosemite iphoto library size.Problem 5: cmake cannot find the required ICU library
Solution
If your brew-installed ICU package cannot be found by cmake, it probably hasn't been linked to a common location. To work around this, invoke:
How To Link Library File Cmake Clion Mac Os Free
Running OpenRCT2
Fire up the binary or application you just built. You should be good to go!
How To Link Library File Cmake Clion Mac Os 10
That's it! If you run into problems please paste all of the information you have into a github issue and we'll take a look.