Skip to content
Snippets Groups Projects
Commit 5859bc12 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

Attempt to fixup alpine ci script.

This was previously 7 attempts at fixing the build.
However, none worked. The commits were all just altering
the build deps.
parent 5447ddbf
No related branches found
No related tags found
No related merge requests found
......@@ -22,16 +22,18 @@ stages: # List of stages for jobs, and their order of execution
build-job: # This job runs in the build stage, which runs first.
stage: build
before_script:
- apk update && apk --update add build-base g++ libstdc++ cmake extra-cmake-modules bash mesa-gl mesa-egl mesa-gles wayland-dev wayland-protocols libxkbcommon-dev
script:
- apk update && apk --update add g++ build-base cmake bash libstdc++
- mkdir build && cd build
- cmake ..
- make
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
before_script:
- apk update && apk --update add build-base g++ libstdc++ cmake extra-cmake-modules bash mesa-gl wayland-dev wayland-protocols
script:
- apk update && apk --update add g++ build-base cmake bash libstdc++ clang-tidy
- mkdir build && cd build
- cmake .. && make # TODO cache build from previous step
- ./tests/testfggl/fggl_test
......
cmake_minimum_required(VERSION 3.10)
project(FGGL VERSION 0.1 LANGUAGES CXX)
set(FGGL_WAYLAND True)
# Set C++ version
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# depdencies
if ( NOT glfw3_FOUND )
include(FetchContent)
set(GLFW_BUILD_EXAMPLES OFF)
set(GLFW_BUILD_TESTS OFF)
if ( FGGL_WAYLAND )
set(GLFW_USE_WAYLAND True)
endif ()
FetchContent_Declare(
glfw3
URL https://github.com/glfw/glfw/releases/download/3.3.4/glfw-3.3.4.zip
)
FetchContent_MakeAvailable( glfw3 )
endif ()
add_subdirectory(vendor/imgui/)
# engine
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
#set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
add_subdirectory(fggl)
# extras
......
......@@ -5,6 +5,10 @@ then
mkdir build
fi
sudo dnf install -y cmake
sudo dnf install -y wayland-devel libxkbcommon-devel wayland-protocols-devel extra-cmake-modules
sudo dnf install -y glew-devel glm-devel
# if doing shader development, disable the cache to make sure changes take affect
rm -rf /tmp/fggl/
......
configure_file(FgglConfig.h.in FgglConfig.h)
# Windowing backend
# find_package( glfw3 REQUIRED )
if ( NOT glfw3_FOUND )
include(FetchContent)
FetchContent_Declare(
glfw3
URL https://github.com/glfw/glfw/releases/download/3.3.4/glfw-3.3.4.zip
)
FetchContent_MakeAvailable( glfw3 )
endif ()
add_library(fggl fggl.cpp ecs/ecs.cpp gfx/window.cpp gfx/renderer.cpp gfx/input.cpp gfx/shader.cpp gfx/ogl.cpp data/model.cpp data/procedural.cpp debug/debug.cpp)
add_library(fggl fggl.cpp
ecs/ecs.cpp
gfx/window.cpp
gfx/renderer.cpp
gfx/input.cpp
gfx/shader.cpp
gfx/ogl.cpp
data/model.cpp
data/procedural.cpp
debug/debug.cpp)
target_include_directories(fggl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
# Graphics backend
......
......@@ -10,5 +10,8 @@ set( IMGUI_SOURCES
add_library(imgui ${IMGUI_SOURCES})
target_include_directories(imgui PUBLIC .)
# GLFW/OpenGL
target_link_libraries(imgui glfw)
target_sources(imgui PRIVATE backends/imgui_impl_glfw.cpp backends/imgui_impl_opengl3.cpp)
target_include_directories(imgui PRIVATE backends)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment