On 03/20/2013 04:31 PM, Alexander Neundorf wrote: >> The keywords won't interact well with PUBLIC/PRIVATE/INTERFACE keywords. > > Let's assume there would be only PRIVATE, INTERFACE_BUILD and > INTERFACE_INSTALL. > I'll use PRIVATE for building the target. > I'll add INTERFACE_BUILD if I want to make using this target within the > project easier. > I'll add INTERFACE_INSTALL if I want to make using this target when installed > easier. > > Am I correct so far ?
No. The keywords are: * PUBLIC = use for me and my dependents * PRIVATE = use for me but not my dependents * INTERFACE = use for my dependents but not me For PUBLIC and INTERFACE the "my dependents" is then split into dependents using "me" from the build tree and dependents using "me" from the install tree. > So e.g. I could do > tid(hello > PRIVATE ${Foo_INCLUDE_DIRS} ${Bar_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/blub > INTERFACE_BUILD ${CMAKE_SOURCE_DIR}/blub ${Bar_INCLUDE_DIRS} > INTERFACE_INSTALL ${INCLUDE_INSTALL_DIR} ${Bar_INCLUDE_DIRS} ) > > In which way would this be problematic ? list(APPEND somelist INTERFACE_INSTALL ${y} INTERFACE_BUILD ${x}) ... tid(hello INTERFACE_INSTALL ${somelist} ${INCLUDE_INSTALL_DIR}) The genex approach binds tightly so this does not happen. The PUBLIC/PRIVATE/INTERFACE information belongs in the tid() call so those keywords should not be in lists. The BUILD/INSTALL information belongs with each (path/directory) value so the genex binds tightly to it and can be in lists. -Brad -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers