[
https://issues.apache.org/jira/browse/LOGCXX-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17146677#comment-17146677
]
Robert Middleton commented on LOGCXX-510:
-----------------------------------------
As far as I am aware, the dependencies need to be built before you can try to
compile log4cxx. This is the procedure that I did:
# Select a directory to install the libraries to(e.g.
C:\Users\<username>\apr-build-install)
# Build expat. To do this, open up the CMakeSettings.json in Visual
Studio(Project->CMake Settings for expat) and set CMAKE_INSTALL_PREFIX to
whatever you defined in step 1. Note: for expat, since I built a debug version
I also had to set CMAKE_DEBUG_POSTFIX to nothing so that the library would not
be libexpatd.dll
# Install expat(Build->Install expat)
# Build APR. Similar to Expat, open up the CMakeSettings.json file and set
CMAKE_INSTALL_PREFIX to the directory we defined in step 1.
# Install APR(Build->Install APR)
# Build APR-Util. Set the CMAKE_INSTALL_PREFIX as we have done before. (also
see note below). You may need to set APR_INCLUDE_DIR and APR_LIBRARIES
manually; this should happen automatically but it may get saved to the CMake
cache and I can't figure out how to purge teh cache from Visual Studio.
# Install APR-util(Build->Install APR-Util)
# Build log4cxx. Set the CMAKE_INSTALL_PREFIX as we have done before.
Note: There doesn't seem to be a way to clean the CMake cache from Visual
Studio; this can lead to things where if you change the path of something, the
old cached value will still be used until the project files are recreated.
Delete the build directory at that point(it should be in the source folder,
named 'out' by default). On the CMakeSettings.json page in Visual Studio, the
button "Save and generate CMake cache to load variables" should do this, but
some projects don't seem to be setup to properly do it(log4cxx itself seems to
work fine).
> Build problems using CMAKE and Visual Studio 2019 Community
> -----------------------------------------------------------
>
> Key: LOGCXX-510
> URL: https://issues.apache.org/jira/browse/LOGCXX-510
> Project: Log4cxx
> Issue Type: Bug
> Components: Build
> Affects Versions: 0.11.0
> Reporter: Thorsten Schöning
> Assignee: Thorsten Schöning
> Priority: Major
> Attachments: CMP00079.png, missing_log4cxx_rc.png,
> set_target_properties.png
>
>
> I just tested building log4cxx using CMAKE and Visual Studio 2019 Community.
> Things failed and I want to use this bug to document everything that I've
> found, because for some things I'm not sure how to handle them properly. Will
> create a new branch to maintain the fixes I came along, so that those can at
> best be later reviewed by others. The branch of interest is currently named
> "logcxx_510_cmake_vs2019_compat".
--
This message was sent by Atlassian Jira
(v8.3.4#803005)