diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 7549f0582..da9a881a8 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -46,7 +46,7 @@ jobs: sudo apt-get update sudo apt-get -y install cmake cmake-data libargtable2-dev libcunit1-dev \ libopenal-dev libconfuse-dev libenet-dev libsdl2-dev libxmp-dev libpng-dev \ - clang-tidy ${{ matrix.config.cc }} + libglew-dev clang-tidy ${{ matrix.config.cc }} - name: Build tests run: | @@ -77,7 +77,7 @@ jobs: run: | sudo apt-get update sudo apt-get -y install cmake libargtable2-dev libcunit1-dev libopenal-dev \ - libconfuse-dev libenet-dev libsdl2-dev libxmp-dev libpng-dev + libconfuse-dev libenet-dev libsdl2-dev libxmp-dev libpng-dev libglew-dev - name: Generate Release run: | @@ -107,7 +107,7 @@ jobs: maintainer: ${{ github.repository_owner }} version: 0.6.6-${{ steps.slug.outputs.sha8 }} arch: 'amd64' - depends: 'libargtable2, libopenal, libconfuse, libenet, libsdl2, libxmp, libpng' + depends: 'libargtable2, libopenal, libconfuse, libenet, libsdl2, libxmp, libpng, libglew' desc: 'One Must Fall 2097 Remake' - name: Upload DEB artifact @@ -130,7 +130,7 @@ jobs: - name: Install Mac Dependencies run: | brew update - brew install cmake argtable cunit openal-soft confuse enet sdl2 libxmp libpng + brew install cmake argtable cunit openal-soft confuse enet sdl2 libxmp libpng glew - name: Generate Release run: | @@ -182,6 +182,7 @@ jobs: -DCMAKE_INCLUDE_PATH="${GITHUB_WORKSPACE}/openomf-win-build-main/include/" \ -DCMAKE_LIBRARY_PATH="${GITHUB_WORKSPACE}/openomf-win-build-main/lib/" \ -DCMAKE_FIND_ROOT_PATH="${GITHUB_WORKSPACE}/openomf-win-build-main/" \ + -DGLEW_USE_STATIC_LIBS=1 \ "${GITHUB_WORKSPACE}" make -j2 make install diff --git a/CMakeLists.txt b/CMakeLists.txt index d16ecec6e..7ebb89b49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ if(GIT_FOUND) ) message(STATUS "Git SHA1 Hash: ${SHA1_HASH}") add_definitions(-DSHA1_HASH="${SHA1_HASH}") -endif() +endif () # System packages (hard dependencies) find_package(SDL2 REQUIRED) @@ -125,9 +125,6 @@ set(COREINCS ) set(CORELIBS - ${SDL2_LIBRARIES} - ${OPENGL_LIBRARIES} - ${GLEW_LIBRARIES} ${CONFUSE_LIBRARY} ${Intl_LIBRARIES} ${ENET_LIBRARY} @@ -303,8 +300,10 @@ endif() # Make sure libraries are linked target_link_libraries(openomf ${CORELIBS}) +target_link_libraries(openomf SDL2::Main OpenGL::GL GLEW::GLEW) foreach(TARGET ${TOOL_TARGET_NAMES}) target_link_libraries(${TARGET} ${CORELIBS}) + target_link_libraries(${TARGET} SDL2::Main OpenGL::GL GLEW::GLEW) endforeach() # Testing stuff @@ -323,6 +322,7 @@ if(CUNIT_FOUND) TESTS_ROOT_DIR="${CMAKE_SOURCE_DIR}/testing") target_link_libraries(openomf_test_main ${CORELIBS}) + target_link_libraries(openomf_test_main SDL2::Main OpenGL::GL GLEW::GLEW) if(MINGW) # Always build as a console executable with mingw @@ -345,7 +345,7 @@ if(WIN32) # This way we have an "openomf/" root directory inside the zip file. install(TARGETS openomf RUNTIME DESTINATION openomf/ COMPONENT Binaries) install(FILES resources/openomf.bk DESTINATION openomf/resources/ COMPONENT Data) - install(FILES shaders/* DESTINATION openomf/shaders/ COMPONENT Data) + install(DIRECTORY shaders/ DESTINATION openomf/shaders COMPONENT Data) install(FILES README.md INSTALL.md LICENSE DESTINATION openomf/ COMPONENT Data) else() # On unixy systems, follow standard. @@ -355,5 +355,5 @@ else() DESTINATION share/games/openomf/ COMPONENT Data ) - install(FILES shaders/* DESTINATION share/games/openomf/shaders/ COMPONENT Data) + install(DIRECTORY shaders/ DESTINATION share/games/openomf/shaders COMPONENT Data) endif() diff --git a/INSTALL.md b/INSTALL.md index ee2594804..5fbca0c8f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -40,6 +40,7 @@ Use at least GCC 9 or Clang 10. MSVC is not supported at this time. Required: * SDL2 (>=2.0.16): http://www.libsdl.org/download-2.0.php +* libglew: https://glew.sourceforge.net/ * confuse: http://www.nongnu.org/confuse/ * Gettext (if you have problems with libintl) * Enet: http://enet.bespin.org/ diff --git a/packaging/debian/CMakeLists.txt b/packaging/debian/CMakeLists.txt index 4a9071fa3..70ca12968 100644 --- a/packaging/debian/CMakeLists.txt +++ b/packaging/debian/CMakeLists.txt @@ -7,7 +7,7 @@ SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET(CPACK_DEBIAN_PACKAGE_SECTION "extra") SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) -SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0 (>= 2.0.3), libopenal1, libconfuse0, libenet7, libpng16-16, libxmp4") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libsdl2-2.0-0 (>= 2.0.3), libopenal1, libconfuse0, libenet7, libpng16-16, libxmp4, libglew") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tuomas Virtanen ") SET(CPACK_DEB_COMPONENT_INSTALL 1)