Closed sourencho closed 4 years ago
Hmm, seems like having a static build on linux (and probably also mac) won't be easy. I get the error below when I try to build on this branch. According to the this forum post we'd have to compile sfml to statically link it.
➜ ungroup_game git:(windows_static_link_build) ✗ ./scripts/build.sh
Detected Ninja is installed. Using Ninja.
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at /Library/Frameworks/SFML.framework/Resources/CMake/SFMLConfig.cmake:103 (message):
Static frameworks are not supported by SFML. Clear SFML_DIR cache entry,
and either change SFML_STATIC_LIBRARIES or CMAKE_FIND_FRAMEWORK before
calling find_package(SFML)
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
CMake Error at /Library/Frameworks/SFML.framework/Resources/CMake/SFMLConfig.cmake:139 (message):
Requested SFML configuration (Static) was not found
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
CMake Error at CMakeLists.txt:15 (find_package):
Found package configuration file:
/Library/Frameworks/SFML.framework/Resources/CMake/SFMLConfig.cmake
but it set SFML_FOUND to FALSE so package "SFML" is considered to be NOT
FOUND.
-- Configuring incomplete, errors occurred!
See also "/Users/peco/Documents/code/ungroup_game/build/CMakeFiles/CMakeOutput.log".
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory
Description
uint
so I replaced them all withuint32_t
GUNGROUP_STATIC
to statically link sfml and gcc stuff-std=c++11
fromCMAKE_CXX_FLAGS
-pthreads
in a generic way with CMake'sfind_package(Threads)
.Fixes
Fixes #178