Hi devs, as we have improved the dbusxml2qt3 significantly, I am trying it out in real life implementation, but I have one question I can not find an answer.
I hope you can help here. The question is how generated header files can be installed. I looked at tdelibs/tdehw, but the generated header files are not being installed.
I am thinking that if a dev library is provided then all the relevant header files for this library should also be available. Now the problem is that it generates the files in some build directory, which I can not access with INSTALL or FILE or whatever I found recently on the net and tested.
Thank in advance
--------------------------------------------------------------------- To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On Sunday 31 of May 2020 12:25:49 deloptes wrote:
Hi devs, as we have improved the dbusxml2qt3 significantly, I am trying it out in real life implementation, but I have one question I can not find an answer.
I hope you can help here. The question is how generated header files can be installed. I looked at tdelibs/tdehw, but the generated header files are not being installed.
I am thinking that if a dev library is provided then all the relevant header files for this library should also be available. Now the problem is that it generates the files in some build directory, which I can not access with INSTALL or FILE or whatever I found recently on the net and tested.
Thank in advance
Hi Emanoil,
installing the generated header files is no problem at all. You can use the standard CMake command install( FILES ... ), where FILES will contain ${CMAKE_CURRENT_BINARY_DIR}/header-to-install.h - for example:
https://mirror.git.trinitydesktop.org/gitea/TDE/tdesdk/src/branch/master/cer...
Cheers
Slávek Banko wrote:
installing the generated header files is no problem at all. You can use the standard CMake command install( FILES ... ), where FILES will contain ${CMAKE_CURRENT_BINARY_DIR}/header-to-install.h - for example:
Hi Slavek, thank you. Yes this is very simple, however I did not mention that I am interested in doing something like
${CMAKE_CURRENT_BINARY_DIR}/*.h
or even better, as I have already a list of source and header files defined for the target and CMAKE_CURRENT_BINARY_DIR I want to do something like
install( FILES ${MY_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/<app>/ )
Is this possible?
thanks
--------------------------------------------------------------------- To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
I found following to be the best solution, although I did not want to use exclude
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${INCLUDE_INSTALL_DIR}/<generated> USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE)
it just fits perfect
--------------------------------------------------------------------- To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On Sunday 31 of May 2020 23:23:24 deloptes wrote:
I found following to be the best solution, although I did not want to use exclude
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${INCLUDE_INSTALL_DIR}/<generated> USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE)
it just fits perfect
Hi,
instead of a solution with install( DIRECTORY ... ), enumerating EXCLUDE and hoping that something unexpected does not arise there, I recommend using file( GLOB ... ) and installing only what is directly required:
file( GLOB _generated_headers ${CMAKE_CURRENT_BINARY_DIR}/*.h ) install( FILES ${_generated_headers} DESTINATION ${INCLUDE_INSTALL_DIR}/<app>/ )
This also allows you to easily add a list ${_generated_headers} to other installed files to use a single install( FILES ... ) for installation of both static and generated headers.
Cheers
Slávek Banko wrote:
file( GLOB _generated_headers ${CMAKE_CURRENT_BINARY_DIR}/*.h ) install( FILES ${_generated_headers} DESTINATION ${INCLUDE_INSTALL_DIR}/<app>/ )
It looks indeed much better, but it did not work :(. It did not install anything. I have to check what is file(GLOB ....)
--------------------------------------------------------------------- To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On Monday 01 of June 2020 09:40:06 deloptes wrote:
Slávek Banko wrote:
file( GLOB _generated_headers ${CMAKE_CURRENT_BINARY_DIR}/*.h ) install( FILES ${_generated_headers} DESTINATION ${INCLUDE_INSTALL_DIR}/<app>/ )
It looks indeed much better, but it did not work :(. It did not install anything. I have to check what is file(GLOB ....)
oh, sure, I didn't realize - the file( GLOB ... ) is processed during the configuration, when the header files are not yet present - that's why it can't work this way. I'll think again...
Cheers
On Monday 01 of June 2020 10:05:23 Slávek Banko wrote:
On Monday 01 of June 2020 09:40:06 deloptes wrote:
Slávek Banko wrote:
file( GLOB _generated_headers ${CMAKE_CURRENT_BINARY_DIR}/*.h ) install( FILES ${_generated_headers} DESTINATION ${INCLUDE_INSTALL_DIR}/<app>/ )
It looks indeed much better, but it did not work :(. It did not install anything. I have to check what is file(GLOB ....)
oh, sure, I didn't realize - the file( GLOB ... ) is processed during the configuration, when the header files are not yet present - that's why it can't work this way. I'll think again...
Cheers
Well, although it's not as nice as the previous recommendations, it seems to work as needed. Keep in mind that it is necessary to place it after all add_subdirectory(...) of the appropriate folder to exclude any possible subfolders.
file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/* ) unset( _exclude_dirs ) foreach( _dir IN LISTS _bin_dirs ) if( IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} ) list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE ) endif() endforeach()
install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${INCLUDE_INSTALL_DIR}/<generated> FILES_MATCHING PATTERN PATTERN "*.h" ${_exclude_dirs} )
Note: You will notice a slash after the folder name listed for DIRECTORY - this is to install only the files in this folder, not the folder itself.
Cheers