It looks like our cmake files are messed up with vcpkg.
I've started fixing it here(I need to update the PR): microsoft/vcpkg#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.
It looks like our cmake files are messed up with vcpkg.
I've started fixing it here(I need to update the PR): microsoft/vcpkg#50020
Problems that I've seen so far:
log4cxxConfig.cmakeandlog4cxx-qtConfig.cmakefiles 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: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
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.