<br>I am using configure_file to generate a batch file on the fly with CMake based on location of Libs found (adding to PATH env var in batch script) and I was wondering if there is a way to not have to create a lot of variables for native paths such as below<br>
<br>--snip CMakelists.txt --<br>SET( GTK2_ROOT_DIR &quot;C:/Program Files/Gtk+&quot; )<br><br>file(TO_NATIVE_PATH ${GTK2_ROOT_DIR} GTK2_ROOT_DIR_NATIVE )<br><br>message( &quot;\tConfiguring batch file&quot; )<br>CONFIGURE_FILE( run_glade_test1.txt ${CMAKE_CURRENT_SOURCE_DIR}/run_glade_test1.bat )<br>
--end snip--<br><br>-snip run_glade_test1.txt--<br>SET PWD=%CD%<br><br>set PATH=${GTK2_ROOT_DIR_NATIVE}\lib<br><br>GladeGTKTest2.exe<br><br>-end snip--<br><br>by default configure_file uses whatever the variable is set to and will not convert to native when generating files.<br>