2009/10/4 motes motes <[email protected]>:
> Is it possible to send a user specified path from CMake to the final
> application (make it visible)? Depending on which machine I build my
> application on the path to some images may vary. I was therefore
> thinking to specify this path when building with CMake like:
>
> FIND_PATH(IMAGE_DIR REQUIRED)
>
> and then in my application do:
>
> #include<string>
> int main(){
>
>   std::string img0 = IMAGE_DIR + "image0.png";
>   return 0;
>
> }

You should use CONFIGURE_FILE for that.

Look for example this section of the Wiki:
http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
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

Reply via email to