This is in fact a Visual Studio project (and I hate this, but I'll have to live with it just for a little while). The problem is that the program will search for two data files in the path set during building time, instead of searching them where they are installed. No compiling errors, just a runtime problem.
I'll take a look at CMAKE_CFG_INTDIR by the way, thank you for your time. Arturo Tyler Roscoe ha scritto: > On Sat, Jan 16, 2010 at 05:02:32PM +0100, Arturo Caissut wrote: > >> suggest I wrote a config.h.in file with pre-compiler instructions: >> >> |#define ATLAS_TXT_PATH "@ATLAS_TXT_PATH@" >> #define ATLAS_HDR_PATH "@ATLAS_HDR_PATH@" >> | >> and I added to my CMakeLists.txt file the following lines: >> >> |set (ATLAS_TXT_PATH "${PROJECT_BINARY_DIR}/ProgramData/Atlas/aal.txt") >> set (ATLAS_HDR_PATH "${PROJECT_BINARY_DIR}/ProgramData/Atlas/aal.hdr") >> >> configure||_file ( >> "${PROJECT_SOURCE_DIR}/path_to_config_file/Config.h.in" >> "${PROJECT_BINARY_DIR}/Config.h") >> >> | >> This perfectly works as long as I'm using a Debug local version of the >> program I'm working at, but how can I provide the path constants to >> change in order to work as well when I build a Release version of the >> program, I package it and I install it to another computer? >> Package CMake code is working fine, Install id good written as well, but >> I need a way to define path constants to be useful when I'm installing >> the program. >> > > Looks like Michael has already given you enough to move forward but I > don't understand how this code could work with Debug and not work with > Release. What error are you getting? It looks like this is for a Visual > Studio project? > > Typically the answer to your question is to use CMAKE_CFG_INTDIR, but I > don't understand your problem. > > tyler > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake