Skip to content

Commit

Permalink
Install libglew in CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
katajakasa committed Apr 23, 2023
1 parent 476e52f commit fa3a964
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -125,9 +125,6 @@ set(COREINCS
)

set(CORELIBS
${SDL2_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${CONFUSE_LIBRARY}
${Intl_LIBRARIES}
${ENET_LIBRARY}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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()
1 change: 1 addition & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <katajakasa@gmail.com>")
SET(CPACK_DEB_COMPONENT_INSTALL 1)

Expand Down

0 comments on commit fa3a964

Please sign in to comment.