1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-18 19:50:38 +01:00

Add SYSTEM to system includes in target_include_directories

This commit is contained in:
Jonas Kvinge 2020-06-26 23:26:04 +02:00
parent b51cc21140
commit 837ae2932f
6 changed files with 53 additions and 36 deletions

View File

@ -12,13 +12,15 @@ set(SINGLEAPP-SOURCES singleapplication.cpp singleapplication_p.cpp)
set(SINGLEAPP-MOC-HEADERS singleapplication.h singleapplication_p.h)
QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
add_library(singleapplication STATIC ${SINGLEAPP-SOURCES} ${SINGLEAPP-SOURCES-MOC})
target_include_directories(singleapplication PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
target_include_directories(singleapplication SYSTEM PRIVATE
${Qt5Core_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_include_directories(singleapplication PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(singleapplication PRIVATE
${Qt5Core_LIBRARIES}
${Qt5Widgets_LIBRARIES}
@ -29,11 +31,13 @@ set(SINGLECOREAPP-SOURCES singlecoreapplication.cpp singlecoreapplication_p.cpp)
set(SINGLECOREAPP-MOC-HEADERS singlecoreapplication.h singlecoreapplication_p.h)
QT5_WRAP_CPP(SINGLECOREAPP-SOURCES-MOC ${SINGLECOREAPP-MOC-HEADERS})
add_library(singlecoreapplication STATIC ${SINGLECOREAPP-SOURCES} ${SINGLECOREAPP-SOURCES-MOC})
target_include_directories(singlecoreapplication SYSTEM PRIVATE
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_include_directories(singlecoreapplication PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_link_libraries(singlecoreapplication PRIVATE
${Qt5Core_LIBRARIES}

View File

@ -14,8 +14,7 @@ link_directories(
add_library(gstmoodbar STATIC ${SOURCES})
target_include_directories(gstmoodbar PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
target_include_directories(gstmoodbar SYSTEM PRIVATE
${GLIB_INCLUDE_DIRS}
${GOBJECT_INCLUDE_DIRS}
${GSTREAMER_INCLUDE_DIRS}
@ -25,6 +24,8 @@ target_include_directories(gstmoodbar PRIVATE
${Qt5Core_INCLUDE_DIRS}
)
target_include_directories(gstmoodbar PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(gstmoodbar PRIVATE
${GLIB_LIBRARIES}
${GOBJECT_LIBRARIES}

View File

@ -30,14 +30,17 @@ link_directories(
add_library(libstrawberry-common STATIC ${SOURCES} ${MOC})
target_include_directories(libstrawberry-common SYSTEM PRIVATE
${GLIB_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_include_directories(libstrawberry-common PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
${GLIB_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_link_libraries(libstrawberry-common PRIVATE

View File

@ -14,12 +14,15 @@ link_directories(
add_library(libstrawberry-tagreader STATIC ${PROTO_SOURCES} ${SOURCES})
target_include_directories(libstrawberry-tagreader PRIVATE
target_include_directories(libstrawberry-tagreader SYSTEM PRIVATE
${GLIB_INCLUDE_DIRS}
${PROTOBUF_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_include_directories(libstrawberry-tagreader PRIVATE
${TAGLIB_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/ext/libstrawberry-common

View File

@ -16,12 +16,15 @@ link_directories(
add_executable(strawberry-tagreader ${SOURCES} ${MOC} ${QRC})
target_include_directories(strawberry-tagreader PRIVATE
target_include_directories(strawberry-tagreader SYSTEM PRIVATE
${GLIB_INCLUDE_DIRS}
${PROTOBUF_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
)
target_include_directories(strawberry-tagreader PRIVATE
${TAGLIB_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ext/libstrawberry-common
${CMAKE_SOURCE_DIR}/ext/libstrawberry-tagreader
${CMAKE_BINARY_DIR}/ext/libstrawberry-tagreader

View File

@ -1001,6 +1001,17 @@ add_library(strawberry_lib STATIC
${OTHER_UIC_SOURCES}
)
target_include_directories(strawberry_lib SYSTEM PUBLIC
${Boost_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${GOBJECT_INCLUDE_DIRS}
${GNUTLS_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIRS}
${QT_INCLUDE_DIRS}
${SINGLEAPPLICATION_INCLUDE_DIRS}
${SINGLECOREAPPLICATION_INCLUDE_DIRS}
)
target_include_directories(strawberry_lib PUBLIC
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
@ -1009,15 +1020,7 @@ target_include_directories(strawberry_lib PUBLIC
${CMAKE_SOURCE_DIR}/ext/libstrawberry-common
${CMAKE_SOURCE_DIR}/ext/libstrawberry-tagreader
${CMAKE_BINARY_DIR}/ext/libstrawberry-tagreader
${Boost_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${GOBJECT_INCLUDE_DIRS}
${GNUTLS_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
${QT_INCLUDE_DIRS}
${SINGLEAPPLICATION_INCLUDE_DIRS}
${SINGLECOREAPPLICATION_INCLUDE_DIRS}
)
target_link_libraries(strawberry_lib PUBLIC
@ -1035,17 +1038,17 @@ target_link_libraries(strawberry_lib PUBLIC
)
if(HAVE_ALSA)
target_include_directories(strawberry_lib PRIVATE ${ALSA_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${ALSA_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${ALSA_LIBRARIES})
endif(HAVE_ALSA)
if(HAVE_LIBPULSE)
target_include_directories(strawberry_lib PRIVATE ${LIBPULSE_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBPULSE_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBPULSE_LIBRARIES})
endif()
if(HAVE_GSTREAMER)
target_include_directories(strawberry_lib PRIVATE
target_include_directories(strawberry_lib SYSTEM PRIVATE
${GSTREAMER_INCLUDE_DIRS}
${GSTREAMER_BASE_INCLUDE_DIRS}
${GSTREAMER_APP_INCLUDE_DIRS}
@ -1068,52 +1071,52 @@ if(HAVE_MOODBAR)
endif()
if(HAVE_XINE)
target_include_directories(strawberry_lib PRIVATE ${LIBXINE_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBXINE_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBXINE_LIBRARIES})
endif()
if(HAVE_VLC)
target_include_directories(strawberry_lib PRIVATE ${LIBVLC_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBVLC_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBVLC_LIBRARIES})
endif()
if(HAVE_CHROMAPRINT)
target_include_directories(strawberry_lib PRIVATE ${CHROMAPRINT_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${CHROMAPRINT_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${CHROMAPRINT_LIBRARIES})
endif(HAVE_CHROMAPRINT)
if(X11_FOUND)
target_include_directories(strawberry_lib PRIVATE ${X11_INCLUDE_DIR})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${X11_INCLUDE_DIR})
target_link_libraries(strawberry_lib PRIVATE ${X11_LIBRARIES})
endif(X11_FOUND)
if(XCB_FOUND)
target_include_directories(strawberry_lib PRIVATE ${XCB_INCLUDE_DIR})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${XCB_INCLUDE_DIR})
target_link_libraries(strawberry_lib PRIVATE ${XCB_LIBRARIES})
endif(XCB_FOUND)
if(HAVE_GIO)
target_include_directories(strawberry_lib PRIVATE ${GIO_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${GIO_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${GIO_LIBRARIES})
endif(HAVE_GIO)
if(HAVE_AUDIOCD)
target_include_directories(strawberry_lib PRIVATE ${LIBCDIO_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBCDIO_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBCDIO_LIBRARIES})
endif(HAVE_AUDIOCD)
if(HAVE_LIBGPOD)
target_include_directories(strawberry_lib PRIVATE ${LIBGPOD_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBGPOD_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBGPOD_LIBRARIES})
endif(HAVE_LIBGPOD)
if(HAVE_LIBMTP)
target_include_directories(strawberry_lib PRIVATE ${LIBMTP_INCLUDE_DIRS})
target_include_directories(strawberry_lib SYSTEM PRIVATE ${LIBMTP_INCLUDE_DIRS})
target_link_libraries(strawberry_lib PRIVATE ${LIBMTP_LIBRARIES})
endif(HAVE_LIBMTP)
if(HAVE_IMOBILEDEVICE)
target_include_directories(strawberry_lib PRIVATE
target_include_directories(strawberry_lib SYSTEM PRIVATE
${LIBUSBMUXD_INCLUDE_DIRS}
${LIBPLIST_INCLUDE_DIRS}
${LIBIMOBILEDEVICE_INCLUDE_DIRS}
@ -1137,7 +1140,7 @@ if(APPLE)
"-framework ScriptingBridge"
)
if(HAVE_SPARKLE)
target_include_directories(strawberry_lib PRIVATE ${SPARKLE}/Headers)
target_include_directories(strawberry_lib SYSTEM PRIVATE ${SPARKLE}/Headers)
target_link_libraries(strawberry_lib PRIVATE ${SPARKLE})
endif(HAVE_SPARKLE)
endif(APPLE)