add debian build and build optimization
This commit is contained in:
parent
b29b376414
commit
7fb2c40213
@ -41,3 +41,15 @@ jobs:
|
|||||||
run: cmake .
|
run: cmake .
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build .
|
run: cmake --build .
|
||||||
|
run-build-debian:
|
||||||
|
container:
|
||||||
|
image: debian:bookworm
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: apt update && apt install --no-install-recommends -y build-essential cmake libsdl2-dev libexiv2-dev mesa-utils nodejs ca-certificates git
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Generate build files
|
||||||
|
run: cmake .
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build .
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
@ -46,5 +50,9 @@ find_package(OpenGL REQUIRED)
|
|||||||
find_package(exiv2 REQUIRED)
|
find_package(exiv2 REQUIRED)
|
||||||
include_directories(${SDL2_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS})
|
include_directories(${SDL2_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
|
|
||||||
add_executable(tview ${SOURCES})
|
add_executable(tview ${SOURCES})
|
||||||
target_link_libraries(tview ${SDL2_LIBRARIES} ${OPENGL_LIBRARIES} exiv2lib)
|
target_link_libraries(tview ${SDL2_LIBRARIES} ${OPENGL_LIBRARIES} exiv2lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user