-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from albin-johansson/dev
Merge dev into main for v0.2.0
- Loading branch information
Showing
1,216 changed files
with
213,612 additions
and
41,711 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: "CI: Windows" | ||
|
||
on: [ push, pull_request ] | ||
|
||
env: | ||
SDL_VERSION: 2.0.16 | ||
IMG_VERSION: 2.0.5 | ||
TTF_VERSION: 2.0.15 | ||
GLEW_VERSION: 2.2.0 | ||
|
||
jobs: | ||
windows-latest-test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- uses: ilammy/msvc-dev-cmd@master | ||
- uses: seanmiddleditch/gha-setup-ninja@master | ||
- uses: lukka/get-cmake@latest | ||
|
||
- name: Create binaries directory | ||
shell: cmd | ||
run: mkdir bin | ||
|
||
- name: Download SDL2 | ||
uses: albin-johansson/download-sdl2@latest | ||
with: | ||
version: ${{env.SDL_VERSION}} | ||
sources_destination: . | ||
binaries_destination: bin | ||
|
||
- name: Download SDL2_image | ||
uses: albin-johansson/download-sdl2-image@latest | ||
with: | ||
version: ${{env.IMG_VERSION}} | ||
sources_destination: . | ||
binaries_destination: bin | ||
|
||
- name: Download SDL2_ttf | ||
uses: albin-johansson/download-sdl2-ttf@latest | ||
with: | ||
version: ${{env.TTF_VERSION}} | ||
sources_destination: . | ||
binaries_destination: bin | ||
|
||
- name: Download GLEW | ||
shell: powershell | ||
run: | | ||
Invoke-WebRequest -Uri "https://sourceforge.net/projects/glew/files/glew/${{env.GLEW_VERSION}}/glew-${{env.GLEW_VERSION}}-win32.zip" ` | ||
-OutFile glew.zip ` | ||
-UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox | ||
7z x -y glew.zip | ||
del glew.zip | ||
Copy-Item -Path glew-${{env.GLEW_VERSION}}/bin/Release/x64/glew32.dll ` | ||
-Destination bin/glew32.dll | ||
- name: Create build folder | ||
shell: cmd | ||
run: cmake -E make_directory ./build | ||
|
||
- name: Build | ||
working-directory: ./build | ||
shell: cmd | ||
env: | ||
SDL2DIR: ${{github.workspace}}/SDL2-${{env.SDL_VERSION}} | ||
SDL2IMAGEDIR: ${{github.workspace}}/SDL2_image-${{env.IMG_VERSION}} | ||
SDL2TTFDIR: ${{github.workspace}}/SDL2_ttf-${{env.TTF_VERSION}} | ||
GLEW_LIBRARIES: ${{github.workspace}}/glew-${{env.GLEW_VERSION}}/lib/Release/x64 | ||
run: | | ||
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja | ||
ninja | ||
- name: Run tests | ||
working-directory: ./build/build/test | ||
shell: cmd | ||
run: TactileTests.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,65 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(tactile CXX) | ||
|
||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") | ||
set(CMAKE_PREFIX_PATH "$ENV{BOOST_ROOT}; $ENV{Qt5_PATH}") | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/build") | ||
|
||
include(Utilities) | ||
if (MSVC) | ||
add_compile_options(/std:c++latest) # This is a workaround for issues with <format> | ||
else () | ||
set(CMAKE_CXX_STANDARD 20) | ||
endif () | ||
|
||
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(LIBRARY_DIR ${ROOT_DIR}/lib) | ||
set(RESOURCE_DIR ${ROOT_DIR}/resources) | ||
|
||
find_env_var(Qt5_PATH) | ||
find_env_var(BOOST_ROOT) | ||
# Target names | ||
set(TACTILE_PROTO prototactile) | ||
set(TACTILE_LIB libtactile) | ||
set(TACTILE_EXE Tactile) | ||
set(TACTILE_TEST TactileTests) | ||
|
||
foreach (path ${CMAKE_PREFIX_PATH}) | ||
message("CMake prefix path: " ${path}) | ||
endforeach (path) | ||
set(TACTILE_IO_IMPORT_LIBRARY "${CMAKE_BINARY_DIR}/modules/tactile-io/TactileIO${CMAKE_IMPORT_LIBRARY_SUFFIX}") | ||
|
||
set(LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib) | ||
list(APPEND CMAKE_PREFIX_PATH | ||
"$ENV{GLEW_LIBRARIES}" | ||
"${LIBRARY_DIR}/glew") | ||
|
||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_STANDARD 20) | ||
find_package(OpenGL REQUIRED) | ||
find_package(GLEW REQUIRED) | ||
find_package(SDL2 REQUIRED) | ||
find_package(SDL2_image REQUIRED) | ||
find_package(SDL2_ttf REQUIRED) | ||
|
||
set(TACTILE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(IMGUI_SOURCES | ||
${LIBRARY_DIR}/imgui/imconfig.h | ||
${LIBRARY_DIR}/imgui/imgui.cpp | ||
${LIBRARY_DIR}/imgui/imgui.h | ||
${LIBRARY_DIR}/imgui/imgui_demo.cpp | ||
${LIBRARY_DIR}/imgui/imgui_draw.cpp | ||
${LIBRARY_DIR}/imgui/imgui_impl_opengl3.cpp | ||
${LIBRARY_DIR}/imgui/imgui_impl_opengl3.h | ||
${LIBRARY_DIR}/imgui/imgui_impl_sdl.cpp | ||
${LIBRARY_DIR}/imgui/imgui_impl_sdl.h | ||
${LIBRARY_DIR}/imgui/imgui_internal.h | ||
${LIBRARY_DIR}/imgui/imgui_tables.cpp | ||
${LIBRARY_DIR}/imgui/imgui_widgets.cpp | ||
${LIBRARY_DIR}/imgui/imstb_rectpack.h | ||
${LIBRARY_DIR}/imgui/imstb_textedit.h | ||
${LIBRARY_DIR}/imgui/imstb_truetype.h) | ||
|
||
find_package(Qt5 COMPONENTS Core Widgets Gui Xml REQUIRED) | ||
find_package(Boost REQUIRED) | ||
set(PUGIXML_SOURCES | ||
${LIBRARY_DIR}/pugixml/pugiconfig.hpp | ||
${LIBRARY_DIR}/pugixml/pugixml.cpp | ||
${LIBRARY_DIR}/pugixml/pugixml.hpp) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
include(Utilities) | ||
include(TactileDependencies) | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(modules/tactile-proto) | ||
add_subdirectory(modules/tactile-io) | ||
add_subdirectory(modules/tactile) | ||
add_subdirectory(test) |
Oops, something went wrong.