[CMake] Beginner's Question: Organizing Projects
Rolf Eike Beer
eike at sf-mail.de
Wed Oct 27 10:04:39 EDT 2010
> Thanks. The way I understand this is that now instead of
>
> include_directories(${GTKMM_INCLUDE_DIRS})
>
> i would write something like
>
> include_directories(${GTKMM_INCLUDE_DIRS})
> # and at the end of the file
> set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} PARENT_SCOPE)
>
> ? I'd do the same with the LINK_DIRECTORIES, LINK_LIBRARIES property and
> for all other libraries?
Don't set LINK_DIRECTORIES and LINK_LIBRARIES. When you are a beginner
probably every usage of them is wrong.
You simply do
TARGET_LINK_LIBRARIES(mytarget ${GTK_LIBRARIES}) (or however that is called)
The only thing you need to "export upwards" in this case would be the
GTK_LIBRARIES variable.
Eike
More information about the CMake
mailing list