CMake: Populate list of required include directories for library targets
PUBLIC items will populate the INTERFACE_INCLUDE_DIRECTORIES property of <target>. This property is a list of public include directories requirements for a library. Targets may populate this property to publish the include directories required to compile against the headers for the target.
This commit is contained in:
@@ -13,9 +13,7 @@ file(GLOB_RECURSE GAME_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
||||
|
||||
add_executable(${GAME} ${GAME_SOURCES})
|
||||
target_include_directories(${GAME} PRIVATE
|
||||
"src"
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
"${CMAKE_SOURCE_DIR}/vendor/ruc/src")
|
||||
"src")
|
||||
target_link_libraries(${GAME} ${ENGINE})
|
||||
|
||||
target_precompile_headers(${GAME} REUSE_FROM ${ENGINE})
|
||||
@@ -25,5 +23,5 @@ target_precompile_headers(${GAME} REUSE_FROM ${ENGINE})
|
||||
# Add 'make run' target
|
||||
add_custom_target(run
|
||||
COMMAND ${GAME}
|
||||
WORKING_DIRECTORY ".."
|
||||
)
|
||||
WORKING_DIRECTORY "..")
|
||||
add_dependencies(run ${ENGINE})
|
||||
|
||||
Reference in New Issue
Block a user