mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Looks like clang is allergic to the libs in the directx5 SDK
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
toolchain:
|
||||
- { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true }
|
||||
- { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true }
|
||||
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true }
|
||||
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, no-dx5-libs: true }
|
||||
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -GNinja -Werror=dev -DENABLE_CLANG_TIDY=${{ !!matrix.toolchain.clang-tidy }}
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -GNinja -Werror=dev -DISLE_USE_DX5_LIBS=${{ !matrix.toolchain.no-dx5-libs }} -DENABLE_CLANG_TIDY=${{ !!matrix.toolchain.clang-tidy }}
|
||||
cmake --build build
|
||||
|
||||
build:
|
||||
|
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
project(isle CXX)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||
option(ENABLE_CLANG_TIDY "Enable clang-tidy")
|
||||
if (ENABLE_CLANG_TIDY)
|
||||
@@ -34,10 +36,13 @@ message(STATUS "MSVC for decompilation: ${MSVC_FOR_DECOMP}")
|
||||
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
|
||||
option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC_FOR_DECOMP})
|
||||
option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON)
|
||||
cmake_dependent_option(ISLE_USE_DX5_LIBS "Build with internal DirectX 5 SDK Libraries" ON ISLE_USE_DX5 OFF)
|
||||
|
||||
add_library(DirectX5::DirectX5 INTERFACE IMPORTED)
|
||||
target_include_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc")
|
||||
target_link_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
||||
if(ISLE_USE_DX5_LIBS)
|
||||
target_link_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
||||
endif()
|
||||
|
||||
add_library(Smacker::Smacker STATIC IMPORTED)
|
||||
set_property(TARGET Smacker::Smacker PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/3rdparty/smacker/smack.lib")
|
||||
|
Reference in New Issue
Block a user