Fix pkg-config static linking
For some reason, [LIB]_STATIC_LINK_LIBRARIES is blank. Thanks a lot, CMake.
This commit is contained in:
parent
eaef25d5da
commit
0aa65f7cd3
2 changed files with 8 additions and 8 deletions
|
@ -439,11 +439,11 @@ if(BACKEND_PLATFORM MATCHES "GLFW3")
|
||||||
if (PKG_CONFIG_STATIC_LIBS)
|
if (PKG_CONFIG_STATIC_LIBS)
|
||||||
message(STATUS "Using system GLFW3 (pkg-config, static)")
|
message(STATUS "Using system GLFW3 (pkg-config, static)")
|
||||||
target_compile_options(CSE2 PRIVATE ${glfw3_STATIC_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${glfw3_STATIC_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${glfw3_STATIC_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${glfw3_STATIC_LDFLAGS})
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
|
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
|
||||||
target_compile_options(CSE2 PRIVATE ${glfw3_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${glfw3_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${glfw3_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${glfw3_LDFLAGS})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET glfw)
|
elseif(TARGET glfw)
|
||||||
# CMake
|
# CMake
|
||||||
|
@ -475,11 +475,11 @@ if(BACKEND_PLATFORM MATCHES "SDL2" OR BACKEND_AUDIO MATCHES "SDL2")
|
||||||
if (PKG_CONFIG_STATIC_LIBS)
|
if (PKG_CONFIG_STATIC_LIBS)
|
||||||
message(STATUS "Using system SDL2 (pkg-config, static)")
|
message(STATUS "Using system SDL2 (pkg-config, static)")
|
||||||
target_compile_options(CSE2 PRIVATE ${sdl2_STATIC_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${sdl2_STATIC_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${sdl2_STATIC_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${sdl2_STATIC_LDFLAGS})
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using system SDL2 (pkg-config, dynamic)")
|
message(STATUS "Using system SDL2 (pkg-config, dynamic)")
|
||||||
target_compile_options(CSE2 PRIVATE ${sdl2_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${sdl2_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${sdl2_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${sdl2_LDFLAGS})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET SDL2::SDL2)
|
elseif(TARGET SDL2::SDL2)
|
||||||
# CMake-generated config (Arch, vcpkg, Raspbian)
|
# CMake-generated config (Arch, vcpkg, Raspbian)
|
||||||
|
@ -519,11 +519,11 @@ if(TARGET PkgConfig::freetype2)
|
||||||
if (PKG_CONFIG_STATIC_LIBS)
|
if (PKG_CONFIG_STATIC_LIBS)
|
||||||
message(STATUS "Using system FreeType (pkg-config, static)")
|
message(STATUS "Using system FreeType (pkg-config, static)")
|
||||||
target_compile_options(CSE2 PRIVATE ${freetype2_STATIC_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${freetype2_STATIC_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${freetype2_STATIC_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${freetype2_STATIC_LDFLAGS})
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using system FreeType (pkg-config, dynamic)")
|
message(STATUS "Using system FreeType (pkg-config, dynamic)")
|
||||||
target_compile_options(CSE2 PRIVATE ${freetype2_CFLAGS})
|
target_compile_options(CSE2 PRIVATE ${freetype2_CFLAGS})
|
||||||
target_link_libraries(CSE2 PRIVATE ${freetype2_LINK_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${freetype2_LDFLAGS})
|
||||||
endif()
|
endif()
|
||||||
elseif(FREETYPE_FOUND)
|
elseif(FREETYPE_FOUND)
|
||||||
message(STATUS "Using system FreeType (CMake)")
|
message(STATUS "Using system FreeType (CMake)")
|
||||||
|
|
|
@ -95,11 +95,11 @@ if(TARGET PkgConfig::glfw3)
|
||||||
if (PKG_CONFIG_STATIC_LIBS)
|
if (PKG_CONFIG_STATIC_LIBS)
|
||||||
message(STATUS "Using system GLFW3 (pkg-config, static)")
|
message(STATUS "Using system GLFW3 (pkg-config, static)")
|
||||||
target_compile_options(DoConfig PRIVATE ${glfw3_STATIC_CFLAGS})
|
target_compile_options(DoConfig PRIVATE ${glfw3_STATIC_CFLAGS})
|
||||||
target_link_libraries(DoConfig PRIVATE ${glfw3_STATIC_LINK_LIBRARIES})
|
target_link_libraries(DoConfig PRIVATE ${glfw3_STATIC_LDFLAGS})
|
||||||
else()
|
else()
|
||||||
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
|
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
|
||||||
target_compile_options(DoConfig PRIVATE ${glfw3_CFLAGS})
|
target_compile_options(DoConfig PRIVATE ${glfw3_CFLAGS})
|
||||||
target_link_libraries(DoConfig PRIVATE ${glfw3_LINK_LIBRARIES})
|
target_link_libraries(DoConfig PRIVATE ${glfw3_LDFLAGS})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET glfw)
|
elseif(TARGET glfw)
|
||||||
# CMake
|
# CMake
|
||||||
|
|
Loading…
Add table
Reference in a new issue