https://github.com/Kitware/CMake
Raw File
Tip revision: e6897c72e7c59f7a0b82ed19c1bdb40d42f7adaa authored by Brad King on 15 February 2019, 12:46:43 UTC
CMake 3.14.0-rc2
Tip revision: e6897c7
CMakeLists.txt
cmake_minimum_required(VERSION 3.0)

project(SourceFileIncludeDirProperty C)

#
# Check that source level include directory take
# precedence over target one

add_executable(SourceFileIncludeDirProperty main.c)

set_property (TARGET SourceFileIncludeDirProperty
  PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/target")

set_property (SOURCE main.c
  PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/source")
back to top