CMake add_subdirectory in subdirectory not included -
i have directory tree this:
libs support db csv patterns support_qt helpers dialogs
etc.
now when add_subdirectory
in support
level, can add db
, patterns
, files collected. in db
added add_subdirectory
referencing csv
, somehow ignored.
in support
set(support_source ${cmake_current_source_dir}/support_defs.h ${cmake_current_source_dir}/support_dll_api.h ${cmake_current_source_dir}/supportlib_namespace.h ${cmake_current_source_dir}/dll_main.cpp ) add_subdirectory (db) add_subdirectory (patterns)
in db
set(support_source ${support_source} ${cmake_current_source_dir}/column_types.h ${cmake_current_source_dir}/dbcolumn.h ${cmake_current_source_dir}/database_login.h ${cmake_current_source_dir}/database_login.cpp ${cmake_current_source_dir}/type_helper.h ${cmake_current_source_dir}/type_helper.cpp parent_scope ) add_subdirectory(csv)
the above works fine in csv
set(support_source ${support_source} ${cmake_current_source_dir}/csv.h ${cmake_current_source_dir}/csv.cpp parent_scope )
but these files not included in build. have put add_subdirectory calls root file?
just found solution. have put add_subdirectory
before set
command.
add_subdirectory(csv) set(support_source ${support_source} ${cmake_current_source_dir}/column_types.h ${cmake_current_source_dir}/dbcolumn.h ${cmake_current_source_dir}/database_login.h ${cmake_current_source_dir}/database_login.cpp ${cmake_current_source_dir}/type_helper.h ${cmake_current_source_dir}/type_helper.cpp parent_scope )
Comments
Post a Comment