diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2247d4b..d93015e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,11 @@ include (${project_cmake_dir}/Utils.cmake) +# Set delimiter for environment variables with multiple path values based on OS +if (WIN32) + set(ENV_PATH_DELIMITER ";") +else() + set(ENV_PATH_DELIMITER ":") +endif() + configure_file(ign.in ${PROJECT_BINARY_DIR}/ign) install (PROGRAMS ${PROJECT_BINARY_DIR}/ign DESTINATION ${BIN_INSTALL_DIR}) diff --git a/src/ign.in b/src/ign.in index d45b147..1eeff38 100755 --- a/src/ign.in +++ b/src/ign.in @@ -34,7 +34,7 @@ yaml_found = false conf_dirs = '@CMAKE_INSTALL_PREFIX@/share/ignition/' conf_dirs = ENV['IGN_CONFIG_PATH'] if ENV.key?('IGN_CONFIG_PATH') -conf_dirs = conf_dirs.split(':') +conf_dirs = conf_dirs.split('@ENV_PATH_DELIMITER@') conf_dirs.each do |conf_directory| next if Dir.glob(conf_directory + '/*.yaml').empty?