fixed atdna macro

This commit is contained in:
Jack Andersen 2015-08-18 13:07:46 -10:00
parent 6809fcc4a4
commit debc677299
1 changed files with 5 additions and 2 deletions

View File

@ -7,10 +7,13 @@ find_package(atdna REQUIRED)
macro(make_dnalist outlist) macro(make_dnalist outlist)
foreach(type ${ARGN}) foreach(type ${ARGN})
get_filename_component(dir ${type} DIRECTORY) get_filename_component(dir ${type} DIRECTORY)
if(dir)
set(dir "${dir}/")
endif()
get_filename_component(name ${type} NAME) get_filename_component(name ${type} NAME)
atdna(${CMAKE_CURRENT_BINARY_DIR}/${dir}atdna_${name}.cpp ${dir}/${name}.hpp) atdna(${dir}atdna_${name}.cpp ${dir}/${name}.hpp)
list(APPEND ${outlist} list(APPEND ${outlist}
${CMAKE_CURRENT_BINARY_DIR}/${dir}/atdna_${name}.cpp ${dir}atdna_${name}.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.hpp) ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.hpp)
endforeach() endforeach()
endmacro() endmacro()