mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-01 13:29:06 +02:00
ci: add GitHub actions for Linux and Windows builds
We build a "static" binary for Windows now to avoid distributing the dependencies as DLLs.
This commit is contained in:
parent
37340926f4
commit
00b93c507d
5 changed files with 151 additions and 0 deletions
0
.github/toolchains/x86_64-linux-gnu.cmake
vendored
Normal file
0
.github/toolchains/x86_64-linux-gnu.cmake
vendored
Normal file
22
.github/toolchains/x86_64-w64-mingw32.cmake
vendored
Normal file
22
.github/toolchains/x86_64-w64-mingw32.cmake
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
set(TARGET x86_64-w64-mingw32)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.github/toolchains/${TARGET})
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSROOT /usr/${TARGET})
|
||||
|
||||
set(CMAKE_C_COMPILER ${TARGET}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TARGET}-g++)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
|
||||
set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/lib/pkgconfig:${CMAKE_SYSROOT}/share/pkgconfig)
|
||||
set(ENV{PKG_CONFIG_PATH} $ENV{PKG_CONFIG_LIBDIR})
|
||||
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
||||
|
5
.github/toolchains/x86_64-w64-mingw32/FindPkgConfig.cmake
vendored
Normal file
5
.github/toolchains/x86_64-w64-mingw32/FindPkgConfig.cmake
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Hack: The toolchain file is evaluated too early to set the library suffixes, so we use a wrapper
|
||||
# around FindPkgConfig set it right before we search for libraries.
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPkgConfig.cmake)
|
Loading…
Add table
Add a link
Reference in a new issue