CMake: Use target_link_directories

This commit is contained in:
Jonas Kvinge
2024-08-27 19:39:53 +02:00
parent 9883dc6925
commit 837e5388ea
9 changed files with 67 additions and 147 deletions

View File

@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.13)
qt_wrap_cpp(MACDEPLOYCHECK_MOC ${CMAKE_SOURCE_DIR}/ext/libstrawberry-common/core/logging.h)
link_directories(${GLIB_LIBRARY_DIRS})
add_executable(macdeploycheck macdeploycheck.cpp ${CMAKE_SOURCE_DIR}/ext/libstrawberry-common/core/logging.cpp ${MACDEPLOYCHECK_MOC})
target_include_directories(macdeploycheck PUBLIC SYSTEM
${GLIB_INCLUDE_DIRS}
@@ -8,6 +10,7 @@ target_include_directories(macdeploycheck PUBLIC
${CMAKE_SOURCE_DIR}/ext/libstrawberry-common
${CMAKE_BINARY_DIR}/src
)
target_link_directories(macdeploycheck PUBLIC ${GLIB_LIBRARY_DIRS})
target_link_libraries(macdeploycheck PUBLIC
"-framework AppKit"
${GLIB_LIBRARIES}