tweak includ dir logic, print path
This commit is contained in:
parent
17b41da525
commit
aa967b3316
1 changed files with 4 additions and 3 deletions
|
|
@ -9,10 +9,10 @@ include_directories( ${SC_SOURCE_DIR}/src/cldai ${SC_SOURCE_DIR}/src/cleditor ${
|
|||
# added as a workaround for changed behavior in newer cmake
|
||||
# versions (changes somewhere between 2.8 and 3.1)
|
||||
function(get_sdai_incl_dir out_path_var sdai_lib)
|
||||
if(DEFINED sdai_${sdai_lib}_SOURCE_DIR)
|
||||
set(${out_path_var} ${sdai_${sdai_lib}_SOURCE_DIR} PARENT_SCOPE)
|
||||
if(NOT "${sdai_${sdai_lib}_SOURCE_DIR}" STREQUAL "")
|
||||
set(${out_path_var} "${sdai_${sdai_lib}_SOURCE_DIR}" PARENT_SCOPE)
|
||||
return()
|
||||
endif(DEFINED sdai_${sdai_lib}_SOURCE_DIR)
|
||||
endif(NOT "${sdai_${sdai_lib}_SOURCE_DIR}" STREQUAL "")
|
||||
get_target_property(sdai_srcs sdai_${sdai_lib} SOURCES)
|
||||
foreach(src ${sdai_srcs})
|
||||
if(${src} MATCHES "schema.cc$")
|
||||
|
|
@ -38,6 +38,7 @@ endfunction(get_sdai_incl_dir out_path_var sdai_target)
|
|||
# three optional args: ARGV3, ARGV4, ARGV5 are include paths, compile flags, and libs, respectively.
|
||||
function(add_schema_dependent_test name sdai_lib exe_args )
|
||||
get_sdai_incl_dir(sdai_src_path ${sdai_lib})
|
||||
message(STATUS "include dir for ${sdai_lib}: ${sdai_src_path}")
|
||||
add_executable(tst_${name} "${name}.cc")
|
||||
set_target_properties(tst_${name} PROPERTIES EXCLUDE_FROM_ALL ON)
|
||||
set_property(TARGET tst_${name} APPEND PROPERTY INCLUDE_DIRECTORIES ${sdai_src_path} ${ARGV3} )
|
||||
|
|
|
|||
Loading…
Reference in a new issue