jasonaowen / Octovasion

:octopus: An RC game jam game! :octopus:
GNU General Public License v3.0
0 stars 0 forks source link

Include SDL dependencies in README #1

Open qwo opened 7 years ago

qwo commented 7 years ago

OSX 10.12 (Sierra) Problem: Trying to build the game and play it, after I ran brew install cmake. I think I'm missing a dependency maybe of SDL2?

and tried

$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" ..

I get stack trace

➜  build git:(master) cmake -G "Unix Makefiles" ..
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- 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
<FindSDL2.cmake>
</FindSDL2.cmake>
CMake Error at /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindSDL2.cmake:173 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:20 (find_package)

-- Configuring incomplete, errors occurred!
See also "/Users/stanleyzheng/Code/Octovasion/build/CMakeFiles/CMakeOutput.log".
jasonaowen commented 7 years ago

@stanzheng yes, on macOS you need to also brew install sdl2 sdl2_image or similar - I'm not sure exactly what the package names are. The docs need to be updated! Also on macOS you can cmake -G "Xcode" .. to get a project you can load, instead of a makefile.

qwo commented 7 years ago

got it to build. thanks @jasonaowen :)

jasonaowen commented 7 years ago

You're welcome! Thank you for pointing out that the readme needs to be updated.