Use LINK_LIBRARIES instead of LIBRARIES
macOS Travis complains about not finding -lSDL2, so use absolute paths instead.
This commit is contained in:
parent
8896b1225b
commit
7d30407206
2 changed files with 8 additions and 8 deletions
|
@ -422,11 +422,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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${glfw3_STATIC_LINK_LIBRARIES})
|
||||||
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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${glfw3_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET glfw)
|
elseif(TARGET glfw)
|
||||||
# CMake
|
# CMake
|
||||||
|
@ -458,11 +458,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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${sdl2_STATIC_LINK_LIBRARIES})
|
||||||
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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${sdl2_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET SDL2::SDL2)
|
elseif(TARGET SDL2::SDL2)
|
||||||
# CMake-generated config (Arch, vcpkg, Raspbian)
|
# CMake-generated config (Arch, vcpkg, Raspbian)
|
||||||
|
@ -502,11 +502,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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${freetype2_STATIC_LINK_LIBRARIES})
|
||||||
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_LIBRARIES})
|
target_link_libraries(CSE2 PRIVATE ${freetype2_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
elseif(FREETYPE_FOUND)
|
elseif(FREETYPE_FOUND)
|
||||||
message(STATUS "Using system FreeType (CMake)")
|
message(STATUS "Using system FreeType (CMake)")
|
||||||
|
|
|
@ -70,11 +70,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_LIBRARIES})
|
target_link_libraries(DoConfig PRIVATE ${glfw3_STATIC_LINK_LIBRARIES})
|
||||||
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_LIBRARIES})
|
target_link_libraries(DoConfig PRIVATE ${glfw3_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
elseif(TARGET glfw)
|
elseif(TARGET glfw)
|
||||||
# CMake
|
# CMake
|
||||||
|
|
Loading…
Add table
Reference in a new issue