Skip to content

Commit 90a2727

Browse files
committed
Fix include directories
Mark system include directories with SYSTEM to avoid picking system includes instead of vendored ones and vice versa
1 parent d6b215a commit 90a2727

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/CMakeLists.txt

+9-4
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,15 @@ target_include_directories(xmoto
448448

449449
"${PROJECT_SOURCE_DIR}/src"
450450

451+
"$<$<NOT:${USE_SYSTEM_Lua}>:${PROJECT_SOURCE_DIR}/vendor/lua/lua>"
452+
453+
# Needed for files generated through configure_file()
454+
"${PROJECT_BINARY_DIR}/src"
455+
)
456+
457+
target_include_directories(xmoto
458+
SYSTEM PRIVATE
459+
451460
"${CURL_INCLUDE_DIR}"
452461
"${LIBXML2_INCLUDE_DIR}"
453462
"${Intl_INCLUDE_DIRS}"
@@ -458,10 +467,6 @@ target_include_directories(xmoto
458467
"${SDL2_TTF_INCLUDE_DIR}"
459468

460469
"$<${USE_SYSTEM_Lua}:${LUA_INCLUDE_DIR}>"
461-
"$<$<NOT:${USE_SYSTEM_Lua}>:${PROJECT_SOURCE_DIR}/vendor/lua/lua>"
462-
463-
# Needed for files generated through configure_file()
464-
"${PROJECT_BINARY_DIR}/src"
465470
)
466471

467472
target_link_libraries(xmoto PUBLIC

0 commit comments

Comments
 (0)