Skip to content

Problems with windows/vcpkg builds #599

@rm5248

Description

@rm5248

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions