Commit afa64dd9 authored by Florian Oetke's avatar Florian Oetke
Browse files

added gitlab-ci

parent 8bec39df
......@@ -13,12 +13,14 @@ build_gcc:
- export CXX=g++
- mkdir build
- cd build
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- mkdir bin
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
artifacts:
paths:
- build/src/demo/demo
- build/src/mirrage/*/*.a
expire_in: 1 day
build_clang:
stage: build
......@@ -27,12 +29,14 @@ build_clang:
- export CXX=clang++
- mkdir build
- cd build
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- mkdir bin
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
artifacts:
paths:
- build/src/demo/demo
- build/src/mirrage/*/*.a
expire_in: 1 week
build_scanbuild:
stage: build
......
......@@ -13,7 +13,7 @@ endif()
add_subdirectory(asyncplusplus)
add_subdirectory(backward-cpp)
add_subdirectory(enet)
add_subdirectory(glm)
include(glm_interface.cmake)
include(gsl_interface.cmake)
add_subdirectory(moodycamel)
include(nuklear_interface.cmake)
......
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(glm)
add_library(glm INTERFACE)
target_include_directories(glm SYSTEM INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/glm/include>
$<INSTALL_INTERFACE:include>)
install(TARGETS glm EXPORT glmTargets)
export(
EXPORT glmTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake"
)
install(
EXPORT glmTargets FILE glmTargets.cmake
NAMESPACE glm::
DESTINATION lib/cmake
)
......@@ -33,3 +33,9 @@ if(MIRRAGE_COMPILE_SHADERS)
include(shaders.cmake)
add_dependencies(demo demo_shaders)
endif()
option(MIRRAGE_EXPORT_EXECUTABLE "Export executable" OFF)
if(MIRRAGE_EXPORT_EXECUTABLE)
install(DIRECTORY ${ROOT_DIR}/assets/ DESTINATION bin)
install(TARGETS demo RUNTIME DESTINATION bin)
endif()
......@@ -42,11 +42,7 @@ install(TARGETS mirrage_asset EXPORT mirrage_asset_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_asset_targets
FILE mirrage_asset.cmake
NAMESPACE mirrage::
......
......@@ -52,11 +52,7 @@ install(TARGETS mirrage EXPORT mirrage_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_targets
FILE mirrage.cmake
NAMESPACE mirrage::
......
......@@ -43,11 +43,7 @@ install(TARGETS mirrage_ecs EXPORT mirrage_ecs_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_ecs_targets
FILE mirrage_ecs.cmake
NAMESPACE mirrage::
......
......@@ -34,11 +34,7 @@ install(TARGETS mirrage_error EXPORT mirrage_error_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_error_targets
FILE mirrage_error.cmake
NAMESPACE mirrage::
......
......@@ -63,11 +63,7 @@ install(TARGETS mirrage_graphic EXPORT mirrage_graphic_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_graphic_targets
FILE mirrage_graphic.cmake
NAMESPACE mirrage::
......
......@@ -43,11 +43,7 @@ install(TARGETS mirrage_gui EXPORT mirrage_gui_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_gui_targets
FILE mirrage_gui.cmake
NAMESPACE mirrage::
......
......@@ -46,11 +46,7 @@ install(TARGETS mirrage_input EXPORT mirrage_input_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_input_targets
FILE mirrage_input.cmake
NAMESPACE mirrage::
......
......@@ -43,11 +43,7 @@ install(TARGETS mirrage_net EXPORT mirrage_net_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_net_targets
FILE mirrage_net.cmake
NAMESPACE mirrage::
......
......@@ -62,11 +62,7 @@ install(TARGETS mirrage_renderer EXPORT mirrage_renderer_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_renderer_targets
FILE mirrage_renderer.cmake
NAMESPACE mirrage::
......
......@@ -50,11 +50,7 @@ install(TARGETS mirrage_utils EXPORT mirrage_utils_targets
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
install(DIRECTORY include/ DESTINATION include)
install(EXPORT mirrage_utils_targets
FILE mirrage_utils.cmake
NAMESPACE mirrage::
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment