kdenetwork - unnecessary find_package(KdepimLibs REQUIRED)

Alexander Neundorf neundorf at kde.org
Thu Oct 22 18:44:15 CEST 2009


On Thursday 22 October 2009, Maciej Mrozowski wrote:
> Hello
>
> kdenetwork (trunk, 4.3 branch) tends to require kdepimlibs at build time,
> when kopete is the only one component using and/or requiring it.
> Attached patch moves this check inside kopete.
> Applicable to trunk and 4.3 branch, is it ok to commit?


+if(INSIDE_KDENETWORK)
 
+	find_package(KdepimLibs REQUIRED)
+	include_directories(${KDEPIMLIBS_INCLUDE_DIR})
+
+else(INSIDE_KDENETWORK)

Why is kdepimlibs only required when kopete is built as part of kdenetwork ?


Also, while you are working on this, could you please check which of all the 
included CheckSomething.cmake files in kopete/CMakeLists.txt and 
krdc/CMakeLists.txt are actually used there ?


And I don't really like this one:
+if(INSIDE_KDENETWORK)

There are at least two other options:
+if(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
which will work not only in kdenetwork, but in all other places too,

or, more similar to the first one:
+if(kdenetwork_SOURCE_DIR)
This exists only when kopete is built as part of kdenetwork, due to the 
project(kdenetwork) 
call at the top of kdenetwork/CMakeLists.txt, which defines this variable (and 
also kdenetwork_BINARY_DIR)

Alex


More information about the Kde-buildsystem mailing list