[CMake] How to embed Qt resources using CMake

Matthew Woehlke matthew.woehlke at kitware.com
Tue Jul 9 15:41:06 EDT 2013


On 2013-07-09 14:46, Júlio Hoffimann wrote:
> One last question, is it portable to use ../ links in CMake? Or you just
> typed it for fast illustration?

I use "../" all over the place... all that is required is a correct 
absolute or relative path to the .qrc (or whatever other source file).

(Relative paths are AFAIK always interpreted relative to either 
CMAKE_CURRENT_SOURCE_DIR or CMAKE_CURRENT_LIST_DIR (I'd guess the 
latter, but they'll be the same in almost all cases for a 
CMakeLists.txt). So as long as your relative path is correct it is safe 
across platforms, etc., if that's what you were asking?)

-- 
Matthew



More information about the CMake mailing list