Re: KCoreAddons forward headers

2013-12-30 Thread Alex Merry
On 30/12/13 00:26, Aleix Pol wrote:
 No, it creates a variable called KCoreAddons_HEADERS which is passed to
 the install() command. ECM_GENERATE_HEADERS doesn't install anything, we
 decided to do it like that to minimize the magic factor. 
 
 Please take a look at the function documentation, in case it's not clear
 enough (it's at the top of the ECMGenerateHeaders.cmake file).

Would VAR be a better keyword for it, then?  That would be in keeping
with other cmake macros.

Alex
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-30 Thread David Faure
On Monday 30 December 2013 01:26:52 Aleix Pol wrote:
 On Sun, Dec 29, 2013 at 8:10 PM, David Faure fa...@kde.org wrote:
  On Sunday 29 December 2013 16:18:23 Christoph Cullmann wrote:
On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
 Hi,
 Here's a patch adding CamelCase headers to KCoreAddons (attached).
 
 If we agree that it's the proper way of doing it, I'll proceed to do
  
  it
  
 on
 the rest of modules.

Looks good to me. I like the fact that we can't forget to add
  
  forwarding
  
headers like before - if we do, the lowercase header isn't installed
either, so we'll notice faster :)
I mean, a single operation is needed to install a new header, instead
  
  of
  
two, one of which I always forgot.
   
   Hmm, does it really install the normal headers, too?
   
   I use it now in kate.git/ktexteditor/include/CMakelists.txt and need
  
  still
  
   to install the normal headers manually.
  
  Well, Aleix's patch removes the installation of the lowercase headers,
  doesn't
  it?
 
 No, it creates a variable called KCoreAddons_HEADERS which is passed to the
 install() command. ECM_GENERATE_HEADERS doesn't install anything, we
 decided to do it like that to minimize the magic factor.

Haha, by remove I meant removes the explicit code that installed the 
lowercase headers, because it is now done semi-automatically.

So if KCoreAddons_HEADERS contains both the lowercase and camelcase headers, 
then we fully agree :)

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-30 Thread Aleix Pol
On Mon, Dec 30, 2013 at 11:42 AM, David Faure fa...@kde.org wrote:

 On Monday 30 December 2013 01:26:52 Aleix Pol wrote:
  On Sun, Dec 29, 2013 at 8:10 PM, David Faure fa...@kde.org wrote:
   On Sunday 29 December 2013 16:18:23 Christoph Cullmann wrote:
 On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
  Hi,
  Here's a patch adding CamelCase headers to KCoreAddons
 (attached).
 
  If we agree that it's the proper way of doing it, I'll proceed
 to do
  
   it
  
  on
  the rest of modules.

 Looks good to me. I like the fact that we can't forget to add
  
   forwarding
  
 headers like before - if we do, the lowercase header isn't
 installed
 either, so we'll notice faster :)
 I mean, a single operation is needed to install a new header,
 instead
  
   of
  
 two, one of which I always forgot.
   
Hmm, does it really install the normal headers, too?
   
I use it now in kate.git/ktexteditor/include/CMakelists.txt and need
  
   still
  
to install the normal headers manually.
  
   Well, Aleix's patch removes the installation of the lowercase headers,
   doesn't
   it?
 
  No, it creates a variable called KCoreAddons_HEADERS which is passed to
 the
  install() command. ECM_GENERATE_HEADERS doesn't install anything, we
  decided to do it like that to minimize the magic factor.

 Haha, by remove I meant removes the explicit code that installed the
 lowercase headers, because it is now done semi-automatically.

 So if KCoreAddons_HEADERS contains both the lowercase and camelcase
 headers,
 then we fully agree :)

 --
 David Faure, fa...@kde.org, http://www.davidfaure.fr
 Working on KDE, in particular KDE Frameworks 5


It only has the lowercase headers, uppercase headers are installed from
another command:
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KCoreAddons DESTINATION
 ${INCLUDE_INSTALL_DIR} COMPONENT Devel )

Aleix
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-30 Thread David Faure
On Monday 30 December 2013 14:59:51 Aleix Pol wrote:
 It only has the lowercase headers, uppercase headers are installed from
 another command:
 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KCoreAddons DESTINATION
  ${INCLUDE_INSTALL_DIR} COMPONENT Devel )

Ah, right.

Sounds good to me as it is, in any case.

I guess Christoph is simply missing the install(FILES ${..._HEADERS} ...) line 
then, to install the lowercase headers.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-29 Thread David Faure
On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
 Hi,
 Here's a patch adding CamelCase headers to KCoreAddons (attached).
 
 If we agree that it's the proper way of doing it, I'll proceed to do it on
 the rest of modules.

Looks good to me. I like the fact that we can't forget to add forwarding 
headers like before - if we do, the lowercase header isn't installed either,
so we'll notice faster :)
I mean, a single operation is needed to install a new header, instead of two, 
one of which I always forgot.


The only bit of syntax I don't really understand is
  REQUIRED_HEADERS KCoreAddons_HEADERS
What does this do / mean ?
It's set in every line AFAICS, so I don't see the purpose, but I'm surely 
missing something.

Anyhow, please proceed, this is the last missing bit of code before we can 
release TP1.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-29 Thread Christoph Cullmann
 On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
  Hi,
  Here's a patch adding CamelCase headers to KCoreAddons (attached).
  
  If we agree that it's the proper way of doing it, I'll proceed to do it on
  the rest of modules.
 
 Looks good to me. I like the fact that we can't forget to add forwarding
 headers like before - if we do, the lowercase header isn't installed either,
 so we'll notice faster :)
 I mean, a single operation is needed to install a new header, instead of two,
 one of which I always forgot.
Hmm, does it really install the normal headers, too?

I use it now in kate.git/ktexteditor/include/CMakelists.txt and need still to 
install
the normal headers manually.

Greetings
Christoph

-- 
- Dr.-Ing. Christoph Cullmann -
AbsInt Angewandte Informatik GmbH  Email: cullm...@absint.com
Science Park 1 Tel:   +49-681-38360-22
66123 Saarbrücken  Fax:   +49-681-38360-20
GERMANYWWW:   http://www.AbsInt.com

Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-29 Thread David Faure
On Sunday 29 December 2013 16:18:23 Christoph Cullmann wrote:
  On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
   Hi,
   Here's a patch adding CamelCase headers to KCoreAddons (attached).
   
   If we agree that it's the proper way of doing it, I'll proceed to do it
   on
   the rest of modules.
  
  Looks good to me. I like the fact that we can't forget to add forwarding
  headers like before - if we do, the lowercase header isn't installed
  either, so we'll notice faster :)
  I mean, a single operation is needed to install a new header, instead of
  two, one of which I always forgot.
 
 Hmm, does it really install the normal headers, too?
 
 I use it now in kate.git/ktexteditor/include/CMakelists.txt and need still
 to install the normal headers manually.

Well, Aleix's patch removes the installation of the lowercase headers, doesn't 
it?

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KCoreAddons forward headers

2013-12-29 Thread Aleix Pol
On Sun, Dec 29, 2013 at 8:10 PM, David Faure fa...@kde.org wrote:

 On Sunday 29 December 2013 16:18:23 Christoph Cullmann wrote:
   On Friday 27 December 2013 19:36:57 Aleix Pol wrote:
Hi,
Here's a patch adding CamelCase headers to KCoreAddons (attached).
   
If we agree that it's the proper way of doing it, I'll proceed to do
 it
on
the rest of modules.
  
   Looks good to me. I like the fact that we can't forget to add
 forwarding
   headers like before - if we do, the lowercase header isn't installed
   either, so we'll notice faster :)
   I mean, a single operation is needed to install a new header, instead
 of
   two, one of which I always forgot.
 
  Hmm, does it really install the normal headers, too?
 
  I use it now in kate.git/ktexteditor/include/CMakelists.txt and need
 still
  to install the normal headers manually.

 Well, Aleix's patch removes the installation of the lowercase headers,
 doesn't
 it?

 --
 David Faure, fa...@kde.org, http://www.davidfaure.fr
 Working on KDE, in particular KDE Frameworks 5NES Power Glove

 ___
 Kde-frameworks-devel mailing list
 Kde-frameworks-devel@kde.org
 https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


No, it creates a variable called KCoreAddons_HEADERS which is passed to the
install() command. ECM_GENERATE_HEADERS doesn't install anything, we
decided to do it like that to minimize the magic factor.

Please take a look at the function documentation, in case it's not clear
enough (it's at the top of the ECMGenerateHeaders.cmake file).

Aleix
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


KCoreAddons forward headers

2013-12-27 Thread Aleix Pol
Hi,
Here's a patch adding CamelCase headers to KCoreAddons (attached).

If we agree that it's the proper way of doing it, I'll proceed to do it on
the rest of modules.

Cheers!
Aleix
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 389245c..ba6644a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_S
 include(FeatureSummary)
 include(CMakePackageConfigHelpers)
 include(ECMSetupVersion)
+include(ECMGenerateHeaders)
 
 include(KDEInstallDirs)
 include(KDEFrameworkCompilerSettings)
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 0e18f42..d9501b3 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -96,40 +96,32 @@ else()
 target_link_libraries(KF5CoreAddons PRIVATE netapi32)
 endif()
 
-if(IS_ABSOLUTE ${INCLUDE_INSTALL_DIR})
-  target_include_directories(KF5CoreAddons INTERFACE $INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR} )
-else()
-  target_include_directories(KF5CoreAddons INTERFACE $INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR} )
-endif()
+target_include_directories(KF5CoreAddons INTERFACE $INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/kcoreaddons )
 
 set_target_properties(KF5CoreAddons PROPERTIES VERSION   ${KCOREADDONS_VERSION_STRING}
SOVERSION ${KCOREADDONS_SOVERSION}
EXPORT_NAME CoreAddons
 )
 
+ecm_generate_headers(KAboutData REQUIRED_HEADERS KCoreAddons_HEADERS)
+ecm_generate_headers(KSharedDataCache REQUIRED_HEADERS KCoreAddons_HEADERS RELATIVE caching)
+ecm_generate_headers(KAutoSaveFile KDirWatch KMessage KProcess KBackup KUrlMimeData
+RELATIVE io REQUIRED_HEADERS KCoreAddons_HEADERS)
+ecm_generate_headers(KCompositeJob KJob KJobTrackerInterface KJobUiDelegate
+RELATIVE jobs REQUIRED_HEADERS KCoreAddons_HEADERS)
+ecm_generate_headers(KRandom KRandomSequence
+RELATIVE randomness REQUIRED_HEADERS KCoreAddons_HEADERS)
+ecm_generate_headers(KMacroExpander KStringHandler
+RELATIVE text REQUIRED_HEADERS KCoreAddons_HEADERS)
+ecm_generate_headers(KFormat KUser KShell
+RELATIVE util REQUIRED_HEADERS KCoreAddons_HEADERS)
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KCoreAddons DESTINATION  ${INCLUDE_INSTALL_DIR} COMPONENT Devel )
+
 install(TARGETS KF5CoreAddons EXPORT KF5CoreAddonsTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
 
 install(FILES
-kaboutdata.h
-caching/kshareddatacache.h
-io/kautosavefile.h
-io/kdirwatch.h
-io/kmessage.h
-io/kprocess.h
-io/kbackup.h
-io/kurlmimedata.h
+${KCoreAddons_HEADERS}
 io/kfilesystemtype_p.h #Needed for building kio, KFileSystemType
-jobs/kcompositejob.h
-jobs/kjob.h
-jobs/kjobtrackerinterface.h
-jobs/kjobuidelegate.h
-randomness/krandom.h
-randomness/krandomsequence.h
-text/kmacroexpander.h
-text/kstringhandler.h
-util/kformat.h
-util/kuser.h
-util/kshell.h
 ${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_export.h
-DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
+DESTINATION ${INCLUDE_INSTALL_DIR}/kcoreaddons COMPONENT Devel
 )
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel