Skip to content

Commit 7377c50

Browse files
Isaac Garzonphkahler
authored andcommitted
build: fix CMake system include directives
The CMake `SYSTEM` modifier of `target_include_directories()` must come before the visibility specification. However, it was accidentally in the wrong order, so it was simply adding a directory named `SYSTEM` to the target's include paths. Fix it to correctly request the include paths to be treated as system include paths.
1 parent a5d40f8 commit 7377c50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if(ENABLE_OPENMP)
126126
target_compile_options(slvs_openmp INTERFACE ${OpenMP_CXX_FLAGS})
127127
target_link_libraries(slvs_openmp INTERFACE
128128
${OpenMP_CXX_LIBRARIES})
129-
target_include_directories(slvs_openmp INTERFACE SYSTEM
129+
target_include_directories(slvs_openmp SYSTEM INTERFACE
130130
${OpenMP_CXX_INCLUDE_DIRS})
131131
message(STATUS "found OpenMP, compiling with flags: " ${OpenMP_CXX_FLAGS} )
132132
endif()

src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
2121

2222
# solvespace dependencies
2323
add_library(slvs_deps INTERFACE)
24-
target_include_directories(slvs_deps INTERFACE SYSTEM
24+
target_include_directories(slvs_deps SYSTEM INTERFACE
2525
${OPENGL_INCLUDE_DIR}
2626
${ZLIB_INCLUDE_DIR}
2727
${PNG_PNG_INCLUDE_DIR}
@@ -38,14 +38,14 @@ target_link_libraries(slvs_deps INTERFACE
3838
mimalloc-static)
3939

4040
if(Backtrace_FOUND)
41-
target_include_directories(slvs_deps INTERFACE SYSTEM
41+
target_include_directories(slvs_deps SYSTEM INTERFACE
4242
${Backtrace_INCLUDE_DIRS})
4343
target_link_libraries(slvs_deps INTERFACE
4444
${Backtrace_LIBRARY})
4545
endif()
4646

4747
if(SPACEWARE_FOUND)
48-
target_include_directories(slvs_deps INTERFACE SYSTEM
48+
target_include_directories(slvs_deps SYSTEM INTERFACE
4949
${SPACEWARE_INCLUDE_DIR})
5050
target_link_libraries(slvs_deps INTERFACE
5151
${SPACEWARE_LIBRARIES})
@@ -421,7 +421,7 @@ if(ENABLE_GUI)
421421
target_sources(solvespace PRIVATE
422422
platform/guigtk.cpp)
423423

424-
target_include_directories(solvespace PRIVATE SYSTEM
424+
target_include_directories(solvespace SYSTEM PRIVATE
425425
${GTKMM_INCLUDE_DIRS}
426426
${JSONC_INCLUDE_DIRS}
427427
${FONTCONFIG_INCLUDE_DIRS})

0 commit comments

Comments
 (0)