fix linux build
This commit is contained in:
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Install Dev Packages
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: >
|
||||
sudo apt update && sudo apt install -y extra-cmake-modules libwayland-dev libxkbcommon-dev xorg-dev libarchive-dev libassimp-dev ninja-build glslang-tools glslang-dev unzip
|
||||
sudo apt update && sudo apt install -y extra-cmake-modules libwayland-dev libxkbcommon-dev xorg-dev libarchive-dev libassimp-dev ninja-build glslang-tools glslang-dev unzip zip
|
||||
&& sudo wget https://sourceforge.net/projects/bin2c/files/1.1/bin2c-1.1.zip && sudo unzip bin2c-1.1.zip && cd bin2c && sudo gcc -o bin2c bin2c.c && sudo mv bin2c /usr/bin
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDEPENDENCY_MIRROR_FILE="${{github.workspace}}/.gitea/workflows/DependencyMirrors.txt"
|
||||
|
||||
10
3rdParty/msdf/CMakeLists.txt
vendored
10
3rdParty/msdf/CMakeLists.txt
vendored
@@ -76,12 +76,20 @@ FetchContent_MakeAvailable(msdfgen_atlas)
|
||||
function(LinkMsdf TARGET)
|
||||
if(WIN32)
|
||||
set(STATIC_LIB_EXT "lib")
|
||||
set(freetype_lib_name "freetype")
|
||||
else()
|
||||
set(STATIC_LIB_EXT "a")
|
||||
set(freetype_lib_name "libfreetype")
|
||||
endif()
|
||||
|
||||
# link freetype first to fix linkage issues on linux
|
||||
target_link_libraries(${TARGET} PUBLIC "${VCPKG_SRC_DIR}/installed/${TRIPLET}/lib/${freetype_lib_name}.${STATIC_LIB_EXT}")
|
||||
file(GLOB installed_libs "${VCPKG_SRC_DIR}/installed/${TRIPLET}/lib/*.${STATIC_LIB_EXT}")
|
||||
foreach(lib ${installed_libs})
|
||||
target_link_libraries(${TARGET} PUBLIC ${lib})
|
||||
get_filename_component(libname ${lib} NAME_WE)
|
||||
if (NOT ${libname} STREQUAL ${freetype_lib_name})
|
||||
target_link_libraries(${TARGET} PUBLIC ${lib})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user