Skip to content

Commit

Permalink
Flag appropriate include directories as SYSTEM
Browse files Browse the repository at this point in the history
  • Loading branch information
DomClark committed Jun 15, 2024
1 parent b50a7d4 commit 8f039b7
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 35 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")
FIND_PACKAGE(Qt5 5.9.0 COMPONENTS Core Gui Widgets Xml REQUIRED)
FIND_PACKAGE(Qt5 COMPONENTS LinguistTools QUIET)

INCLUDE_DIRECTORIES(
include_directories(SYSTEM
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
Expand Down Expand Up @@ -410,7 +410,7 @@ IF(WANT_SOUNDIO)
IF(SOUNDIO_FOUND)
SET(LMMS_HAVE_SOUNDIO TRUE)
SET(STATUS_SOUNDIO "OK")
INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}")
include_directories(SYSTEM "${SOUNDIO_INCLUDE_DIR}")
ELSE(SOUNDIO_FOUND)
SET(SOUNDIO_INCLUDE_DIR "")
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/StaticDependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# StaticLinking.cmake - adds features similar to interface properties that are
# only transitive over static dependencies.
# StaticDependencies.cmake - adds features similar to interface properties that
# are only transitive over static dependencies.
#
# Copyright (c) 2024 Dominic Clark
#
Expand Down
4 changes: 2 additions & 2 deletions plugins/CarlaBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(LMMS_HAVE_WEAKCARLA)
SET(CARLA_NATIVE_LIB carla_native-plugin)

ADD_LIBRARY(${CARLA_NATIVE_LIB} SHARED DummyCarla.cpp)
TARGET_INCLUDE_DIRECTORIES(${CARLA_NATIVE_LIB} SYSTEM PUBLIC ${CARLA_INCLUDE_DIRS})
target_include_directories(${CARLA_NATIVE_LIB} SYSTEM PUBLIC ${CARLA_INCLUDE_DIRS})
INSTALL(TARGETS ${CARLA_NATIVE_LIB}
LIBRARY DESTINATION "${PLUGIN_DIR}/optional"
RUNTIME DESTINATION "${PLUGIN_DIR}/optional"
Expand All @@ -31,7 +31,7 @@ if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
SET(CARLA_INCLUDE_DIRS ${CARLA_INCLUDE_DIRS} PARENT_SCOPE)

INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS})
include_directories(SYSTEM ${CARLA_INCLUDE_DIRS})
LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(${CARLA_LIBRARIES})
BUILD_PLUGIN(carlabase Carla.cpp Carla.h
Expand Down
3 changes: 2 additions & 1 deletion plugins/CarlaPatchbay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
ADD_DEFINITIONS(-DCARLA_PLUGIN_PATCHBAY -DCARLA_PLUGIN_SYNTH)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
include_directories(SYSTEM ${CARLA_INCLUDE_DIRS})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase"
${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(carlabase)
Expand Down
3 changes: 2 additions & 1 deletion plugins/CarlaRack/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA)
ADD_DEFINITIONS(-DCARLA_PLUGIN_RACK -DCARLA_PLUGIN_SYNTH)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
include_directories(SYSTEM ${CARLA_INCLUDE_DIRS})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase"
${CARLA_LIBRARY_DIRS})
LINK_LIBRARIES(carlabase)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Eq/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS})
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
BUILD_PLUGIN(eq EqEffect.cpp EqCurve.cpp EqCurve.h EqControls.cpp EqControlsDialog.cpp EqFilter.h EqParameterWidget.cpp EqFader.h EqSpectrumView.h EqSpectrumView.cpp
MOCFILES EqControls.h EqControlsDialog.h EqCurve.h EqParameterWidget.h EqFader.h EqSpectrumView.h EMBEDDED_RESOURCES *.png)
2 changes: 1 addition & 1 deletion plugins/GigPlayer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if(LMMS_HAVE_GIG)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${GIG_INCLUDE_DIRS})
include_directories(SYSTEM ${GIG_INCLUDE_DIRS})
SET(CMAKE_AUTOUIC ON)

# Required for not crashing loading files with libgig
Expand Down
6 changes: 3 additions & 3 deletions plugins/Lv2Effect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IF(LMMS_HAVE_LV2)
INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS})
include_directories(SYSTEM ${LV2_INCLUDE_DIRS})
include_directories(SYSTEM ${LILV_INCLUDE_DIRS})
include_directories(SYSTEM ${SUIL_INCLUDE_DIRS})
INCLUDE(BuildPlugin)
BUILD_PLUGIN(lv2effect Lv2Effect.cpp Lv2FxControls.cpp Lv2FxControlDialog.cpp Lv2Effect.h Lv2FxControls.h Lv2FxControlDialog.h
MOCFILES Lv2Effect.h Lv2FxControls.h Lv2FxControlDialog.h
Expand Down
6 changes: 3 additions & 3 deletions plugins/Lv2Instrument/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IF(LMMS_HAVE_LV2)
INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS})
include_directories(SYSTEM ${LV2_INCLUDE_DIRS})
include_directories(SYSTEM ${LILV_INCLUDE_DIRS})
include_directories(SYSTEM ${SUIL_INCLUDE_DIRS})
INCLUDE(BuildPlugin)
BUILD_PLUGIN(lv2instrument Lv2Instrument.cpp Lv2Instrument.h MOCFILES Lv2Instrument.h EMBEDDED_RESOURCES logo.png)
ENDIF(LMMS_HAVE_LV2)
22 changes: 14 additions & 8 deletions plugins/SlicerT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
INCLUDE(BuildPlugin)
include(BuildPlugin)

INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
LINK_LIBRARIES(${FFTW3F_LIBRARIES})
include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS})
link_libraries(${FFTW3F_LIBRARIES})

INCLUDE_DIRECTORIES(${SAMPLERATE_INCLUDE_DIRS})
LINK_DIRECTORIES(${SAMPLERATE_LIBRARY_DIRS})
LINK_LIBRARIES(${SAMPLERATE_LIBRARIES})

BUILD_PLUGIN(slicert SlicerT.cpp SlicerT.h SlicerTView.cpp SlicerTView.h SlicerTWaveform.cpp SlicerTWaveform.h MOCFILES SlicerT.h SlicerTView.h SlicerTWaveform.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
build_plugin(slicert
SlicerT.cpp
SlicerT.h
SlicerTView.cpp
SlicerTView.h
SlicerTWaveform.cpp
SlicerTWaveform.h
MOCFILES SlicerT.h SlicerTView.h SlicerTWaveform.h
EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png"
)
target_link_libraries(slicert SampleRate::samplerate)
2 changes: 1 addition & 1 deletion plugins/SpectrumAnalyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS})

LINK_LIBRARIES(${FFTW3F_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion plugins/VstBase/RemoteVstPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if(IS_MINGW)
" HAS_STD_MUTEX)

if(NOT HAS_STD_MUTEX)
target_include_directories(${EXE_NAME} PRIVATE
target_include_directories(${EXE_NAME} SYSTEM PRIVATE
"${LMMS_SOURCE_DIR}/src/3rdparty/mingw-std-threads")
target_compile_definitions(${EXE_NAME} PRIVATE
-DUSE_MINGW_THREADS_REPLACEMENT)
Expand Down
8 changes: 5 additions & 3 deletions plugins/ZynAddSubFx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# definitions for ZynAddSubFX
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
FIND_PACKAGE(X11)
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
include_directories(SYSTEM ${X11_INCLUDE_DIR})
ADD_DEFINITIONS(-DOS_LINUX)
ELSE()
ADD_DEFINITIONS(-DOS_WINDOWS)
Expand Down Expand Up @@ -44,10 +44,12 @@ IF(NOT EXISTS ${FLTK_FLUID_EXECUTABLE})
ENDIF()
ENDIF()

include_directories(
include_directories(SYSTEM
"${FLTK_INCLUDE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
${FFTW3F_INCLUDE_DIRS}
)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_BINARY_DIR}"
)
Expand Down
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,30 @@ ADD_GEN_QRC(LMMS_RCC_OUT lmms.qrc
FILE(RELATIVE_PATH LIB_DIR_RELATIVE "/${BIN_DIR}" "/${LIB_DIR}")
FILE(RELATIVE_PATH PLUGIN_DIR_RELATIVE "/${BIN_DIR}" "/${PLUGIN_DIR}")
ADD_DEFINITIONS(-DLIB_DIR="${LIB_DIR_RELATIVE}" -DPLUGIN_DIR="${PLUGIN_DIR_RELATIVE}" ${PULSEAUDIO_DEFINITIONS})
INCLUDE_DIRECTORIES(
include_directories(SYSTEM
${JACK_INCLUDE_DIRS}
${SNDIO_INCLUDE_DIRS}
${FFTW3F_INCLUDE_DIRS}
)

IF(NOT LMMS_HAVE_SDL2 AND NOT ("${SDL_INCLUDE_DIR}" STREQUAL ""))
INCLUDE_DIRECTORIES("${SDL_INCLUDE_DIR}")
include_directories(SYSTEM "${SDL_INCLUDE_DIR}")
ENDIF()

IF(NOT ("${PULSEAUDIO_INCLUDE_DIR}" STREQUAL ""))
INCLUDE_DIRECTORIES("${PULSEAUDIO_INCLUDE_DIR}")
include_directories(SYSTEM "${PULSEAUDIO_INCLUDE_DIR}")
ENDIF()

IF(NOT ("${LV2_INCLUDE_DIRS}" STREQUAL ""))
INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS})
include_directories(SYSTEM ${LV2_INCLUDE_DIRS})
ENDIF()

IF(NOT ("${LILV_INCLUDE_DIRS}" STREQUAL ""))
INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS})
include_directories(SYSTEM ${LILV_INCLUDE_DIRS})
ENDIF()

IF(NOT ("${SUIL_INCLUDE_DIRS}" STREQUAL ""))
INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS})
include_directories(SYSTEM ${SUIL_INCLUDE_DIRS})
ENDIF()

# Use libraries in non-standard directories (e.g., another version of Qt)
Expand Down

0 comments on commit 8f039b7

Please sign in to comment.