ref: 7d3040720615e6a5d72740e40e9c1c631316e702
parent: 8896b1225b6d02033e2890b38812ddcafbdf9a1a
author: Clownacy <[email protected]>
date: Thu Apr 2 16:57:16 EDT 2020
Use LINK_LIBRARIES instead of LIBRARIES macOS Travis complains about not finding -lSDL2, so use absolute paths instead.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -422,11 +422,11 @@
if (PKG_CONFIG_STATIC_LIBS)
message(STATUS "Using system GLFW3 (pkg-config, static)")
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()
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
target_compile_options(CSE2 PRIVATE ${glfw3_CFLAGS})
- target_link_libraries(CSE2 PRIVATE ${glfw3_LIBRARIES})
+ target_link_libraries(CSE2 PRIVATE ${glfw3_LINK_LIBRARIES})
endif()
elseif(TARGET glfw)
# CMake
@@ -458,11 +458,11 @@
if (PKG_CONFIG_STATIC_LIBS)
message(STATUS "Using system SDL2 (pkg-config, static)")
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()
message(STATUS "Using system SDL2 (pkg-config, dynamic)")
target_compile_options(CSE2 PRIVATE ${sdl2_CFLAGS})
- target_link_libraries(CSE2 PRIVATE ${sdl2_LIBRARIES})
+ target_link_libraries(CSE2 PRIVATE ${sdl2_LINK_LIBRARIES})
endif()
elseif(TARGET SDL2::SDL2)
# CMake-generated config (Arch, vcpkg, Raspbian)
@@ -502,11 +502,11 @@
if (PKG_CONFIG_STATIC_LIBS)
message(STATUS "Using system FreeType (pkg-config, static)")
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()
message(STATUS "Using system FreeType (pkg-config, dynamic)")
target_compile_options(CSE2 PRIVATE ${freetype2_CFLAGS})
- target_link_libraries(CSE2 PRIVATE ${freetype2_LIBRARIES})
+ target_link_libraries(CSE2 PRIVATE ${freetype2_LINK_LIBRARIES})
endif()
elseif(FREETYPE_FOUND)
message(STATUS "Using system FreeType (CMake)")
--- a/DoConfig/CMakeLists.txt
+++ b/DoConfig/CMakeLists.txt
@@ -70,11 +70,11 @@
if (PKG_CONFIG_STATIC_LIBS)
message(STATUS "Using system GLFW3 (pkg-config, static)")
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()
message(STATUS "Using system GLFW3 (pkg-config, dynamic)")
target_compile_options(DoConfig PRIVATE ${glfw3_CFLAGS})
- target_link_libraries(DoConfig PRIVATE ${glfw3_LIBRARIES})
+ target_link_libraries(DoConfig PRIVATE ${glfw3_LINK_LIBRARIES})
endif()
elseif(TARGET glfw)
# CMake