rm5248 opened a new issue, #599:
URL: https://github.com/apache/logging-log4cxx/issues/599

   It looks like our cmake files are messed up with vcpkg.
   
   I've started fixing it here(I need to update the PR): 
https://github.com/microsoft/vcpkg/pull/50020
   
   Problems that I've seen so far:
   
   - The way the vcpkg file works at the moment, only Qt5 is supported(not Qt6)
   - the `log4cxxConfig.cmake` and `log4cxx-qtConfig.cmake` files are not 
properly installed.  On Linux, these seem to be installed by vcpkg fine, but on 
Windows the Qt stuff is not found properly.  I had to do the following to get 
it to be found:
   ```
   find_package(log4cxx CONFIG REQUIRED)
   if(WIN32)
        # vcpkg build a little buggy on windows at the moment with vcpkg
        find_package(log4cxx-qt CONFIG REQUIRED PATHS ${log4cxx_DIR})
   else()
        find_package(log4cxx-qt CONFIG REQUIRED)
   endif(WIN32)
   ```
   This is at least partially due to the differences in how cmake finds 
packages on windows vs. unix: 
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
   - Because of the above, we should probably move the Qt compilation to be a 
component, not a separate cmake configuration.  e.g. `find_package(log4cxx 
CONFIG REQUIRED COMPONENTS qt)`
   
   if we're making changes to the cmake files to make it more standardized, we 
should do this as part of our ABI change as well, since it does cause any 
dependent software to change how their builds are working.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to