diff --git a/Brewfile b/Brewfile index 131d17a3c..5cfb74b04 100644 --- a/Brewfile +++ b/Brewfile @@ -1,8 +1,9 @@ +brew "cmake" brew "libogg" brew "libvorbis" brew "openal-soft" brew "freetype" brew "curl" -brew "openssl@1.1" +brew "nettle" brew "fribidi" brew "glew" diff --git a/CMakeLists.txt b/CMakeLists.txt index 46d3784d1..8bbcd3163 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,7 @@ option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angels option(USE_SYSTEM_ENET "Use system ENET instead of the built-in version, when available." ON) option(USE_SYSTEM_GLEW "Use system GLEW instead of the built-in version, when available." ON) -CMAKE_DEPENDENT_OPTION(USE_CRYPTO_OPENSSL "Use OpenSSL instead of Nettle for cryptography in STK." OFF - "NOT APPLE" ON) +option(USE_CRYPTO_OPENSSL "Use OpenSSL instead of Nettle for cryptography in STK." OFF) CMAKE_DEPENDENT_OPTION(BUILD_RECORDER "Build opengl recorder" ON "NOT SERVER_ONLY;NOT APPLE" OFF) CMAKE_DEPENDENT_OPTION(USE_FRIBIDI "Support for right-to-left languages" ON diff --git a/INSTALL.md b/INSTALL.md index fbcd8b06b..8390b38d9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -187,35 +187,21 @@ sudo ln -s `xcrun --show-sdk-path`/System/Library/Frameworks/OpenGL.framework/He ``` The first link is required in order to find libcurl, the second to find opengl. -### CMake +### STK 0.10 or later (or latest git) -CMake is used to build STK. At this time CMake will not make a binary that is ready for distribution. - -You'll have to run these commands inside your stk-code directory. - - -### STK 0.9.4 or later (or latest git) - -Install homebrew ( https://brew.sh/) -Install all of the dependencies using homebrew : +Install homebrew (https://brew.sh/) +Install all of the dependencies using homebrew: ```bash -brew install libogg -brew install libvorbis -brew install openal-soft -brew install freetype -brew install curl -brew install nettle -brew install openssl@1.1 -brew install fribidi -brew install glew +cd /path/to/stk-code +brew bundle ``` Build STK ```bash mkdir cmake_build cd cmake_build -CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/ /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib +CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/glew/:/usr/local/opt/fribidi/ cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib make ``` @@ -236,6 +222,7 @@ Download pre-built dependencies from [here](https://sourceforge.net/projects/sup Building with clang: ```bash +cd /path/to/stk-code mkdir cmake_build cd cmake_build cmake .. @@ -244,6 +231,7 @@ make Building with GCC: ```bash +cd /path/to/stk-code mkdir cmake_build cd cmake_build cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc