[CMake] Cannot set CMP0022 to OLD

Stephen Kelly steveire at gmail.com
Sat Dec 14 09:15:38 EST 2013


Stephen Kelly wrote:

> Your options are:

Option 3 is to depend on CMake 2.8.9+ and port away from the use of 
target_link_libraries with LINK_INTEFACE_LIBRARIES and use LINK_PUBLIC and 
LINK_PRIVATE instead:

 @@ -17,10 +18,9 @@ cmake_policy(SET CMP0022 OLD)
  kde4_add_library(sublime SHARED ${sublime_LIB_SRCS})
  cmake_policy(SET CMP0022 OLD)
  target_link_libraries(sublime 
 +  LINK_PRIVATE
          ${KDE4_KDEUI_LIBS} 
 -        ${KDE4_KPARTS_LIBS})
 -cmake_policy(SET CMP0022 OLD)
 -target_link_libraries(sublime LINK_INTERFACE_LIBRARIES
 +  LINK_PUBLIC
          ${KDE4_KPARTS_LIBS})


Thanks,

Steve.




More information about the CMake mailing list