Skip to content
Snippets Groups Projects
Commit 982db737 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

ENH: third arg must be a directory with pathsep at end

parent 367138b4
No related branches found
No related tags found
No related merge requests found
......@@ -29,15 +29,16 @@ foreach(otb_app ${app_list})
set(dfile "${OTB_BINARY_DIR}/descriptors/${otb_app}.txt")
add_custom_command(OUTPUT "${dfile}"
COMMAND "$<TARGET_FILE:otbQgisDescriptor>"
"${otb_app}" "${OTB_BINARY_DIR}/lib/otb/applications"
"${otb_app}" "${OTB_BINARY_DIR}/lib/otb/applications" "${OTB_BINARY_DIR}/descriptors/"
DEPENDS otbQgisDescriptor
WORKING_DIRECTORY ${OTB_BINARY_DIR}/descriptors/
COMMENT "./bin/otbQgisDescriptor ${otb_app} ${OTB_BINARY_DIR}/lib/otb/applications"
WORKING_DIRECTORY ${OTB_BINARY_DIR}
COMMENT "./bin/otbQgisDescriptor ${otb_app} ./lib/otb/applications ./descriptors/"
VERBATIM)
list(APPEND dfiles "${dfile}")
endforeach()
add_custom_target(generate_qgis_descriptor
COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Generating descriptor files for QGIS"
COMMAND "${CMAKE_COMMAND}" "-E" "remove" "${OTB_BINARY_DIR}/descriptors/algs.txt"
COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Installing: ${CMAKE_INSTALL_PREFIX}/descriptors/"
COMMAND "${CMAKE_COMMAND}" "-E" "copy_directory" "${OTB_BINARY_DIR}/descriptors" "${CMAKE_INSTALL_PREFIX}/descriptors"
DEPENDS ${dfiles}
......
......@@ -95,26 +95,18 @@ int main(int argc, char* argv[])
std::string output_file = module + ".txt";
std::string algs_txt = "algs.txt";
if (argc > 3) {
#if defined(WIN32)
std::string output_dir = std::string(argv[3]) + "\\";
#else
std::string output_dir = std::string(argv[3]) + "/";
#endif
output_file = output_dir + module + ".txt";
algs_txt = output_dir + "algs.txt";
if (argc > 3)
{
output_file = std::string(argv[3]) + module + ".txt";
algs_txt = std::string(argv[3]) + "algs.txt";
}
#if 0
std::cout << "output_file: " << output_file << std::endl;
std::cout << "algs_txt: " << algs_txt << std::endl;
#endif
std::ofstream dFile;
dFile.open (output_file, std::ios::out);
std::cerr << "Writing " << output_file << std::endl;
std::string output_parameter_name;
bool hasRasterOutput = false;
{
for (unsigned int i = 0; i < nbOfParam; i++)
{
Parameter::Pointer param = appli->GetParameterByKey(appKeyList[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment