kde's cmake files/macros

Alexander Neundorf neundorf at kde.org
Thu Feb 9 18:16:06 CET 2006


Hi,

On Thursday 09 February 2006 17:31, Peter Kümmel wrote:
> Here are some ideas to the cmake files.
>
> Peter
>
> -- at the moment FindPCRE requires both libraries, PCREPOSIX and PCRE.
> -- it should prefer PCREPOSIX as mentioned in kjs/regexp.h.
>
> Index: cmake/modules/FindPCRE.cmake
> ===================================================================
> --- cmake/modules/FindPCRE.cmake	(Revision 507308)
> +++ cmake/modules/FindPCRE.cmake	(Arbeitskopie)
> @@ -16,7 +16,17 @@
>  /usr/local/lib
>  )
>
> -SET(PCRE_LIBRARY ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY})
> +#perfer pcreposix (see kjs/regexp.h)
> +IF(PCRE_PCREPOSIX_LIBRARY)
> +   SET(PCRE_LIBRARY ${PCRE_PCREPOSIX_LIBRARY})
> +   #don't ask for both
> +   SET(PCRE_PCRE_LIBRARY)
> +ELSE(PCRE_PCREPOSIX_LIBRARY)
> +   SET(PCRE_LIBRARY ${PCRE_PCRE_LIBRARY})
> +   #don't ask for both
> +   SET(PCRE_PCREPOSIX_LIBRARY)
> +ENDIF(PCRE_PCREPOSIX_LIBRARY)
> +

Do you have only one of these two ?

> -- search at the default installation path for kdewin32
>
> Index: cmake/modules/FindKDE4.cmake
> ===================================================================
> --- cmake/modules/FindKDE4.cmake	(Revision 507308)
> +++ cmake/modules/FindKDE4.cmake	(Arbeitskopie)
> @@ -180,8 +180,10 @@
>
>
>     # at first find the kdewin32 library, this has to be compiled and
> installed before kdelibs/ -   FIND_LIBRARY(KDEWIN32_LIBRARY NAMES kdewin32
> PATHS )
> -   FIND_PATH(KDEWIN32_INCLUDE_DIR winposix_export.h )
> +   FIND_LIBRARY(KDEWIN32_LIBRARY NAMES kdewin32 PATHS
> +      $ENV{ProgramFiles}/kdewin32/lib )
> +   FIND_PATH(KDEWIN32_INCLUDE_DIR winposix_export.h PATHS
> +      $ENV{ProgramFiles}/kdewin32/include )
>
>     # kdelibs/win/ has to be built before the rest of kdelibs/
>     # eventually it will be moved out from kdelibs/


Sounds good. Does the env. variable ProgramFiles exist on all windows 
installations, independent from the language, etc. ?

> Index: kjs/CMakeLists.txt
> ===================================================================
> --- kjs/CMakeLists.txt	(Revision 507308)
> +++ kjs/CMakeLists.txt	(Arbeitskopie)
> @@ -8,11 +8,12 @@
>  macro_optional_find_package(PCRE)
>  if(PCRE_FOUND)
>     include_directories(${PCRE_INCLUDE_DIR})
> +   check_include_files(pcre.h HAVE_PCREPOSIX)
>  else(PCRE_FOUND)

Committed, slightly modified


> @@ -28,6 +29,8 @@
>        COMMAND ${PERL_EXECUTABLE}
>        ARGS ${CREATE_HASH_TABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_in_FILE} -i
> > ${CMAKE_CURRENT_BINARY_DIR}/${_out_FILE} DEPENDS
> ${CMAKE_CURRENT_SOURCE_DIR}/${_in_FILE} )
> +   MACRO_ADD_FILE_DEPENDENCIES(${_dep_FILE}
> ${CMAKE_CURRENT_BINARY_DIR}/${_out_FILE}) endmacro(CREATE_LUT)

This looks more like a problem with cmake, it shouldn't be required.

>  create_lut(date_object.cpp date_object.lut.h date_object.cpp)
...
> -- this is just a hint to make the  "kde4_add_ui_files" macro work with
> msvc -- the *ui.h files are only generated  if a other file is dependent on
>
>
> Index: kdeui/CMakeLists.txt
> ===================================================================
> --- kdeui/CMakeLists.txt	(Revision 507308)
> +++ kdeui/CMakeLists.txt	(Arbeitskopie)
> @@ -136,6 +136,8 @@
>  kspellui.ui
>  )
>
> +MACRO_ADD_FILE_DEPENDENCIES(kspelldlg.cpp 
> ${CMAKE_CURRENT_BINARY_DIR}/kspellui.h) +
>  kde4_add_ui_files(kdeui_LIB_SRCS ${kdeui_UI} )

Same here.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list