[ 
https://issues.apache.org/jira/browse/LOGCXX-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188889#comment-17188889
 ] 

Robert Middleton commented on LOGCXX-510:
-----------------------------------------

So after thinking about this for a bit, I think the following summarizes the 
issue:

 
 # In order for tests(and log4cxx in general) to run, APR and APR-Util DLLs 
must be on your PATH or in the directory that the application starts from.
 # The directories for APR and APR-Util are found using the FindAPR.cmake and 
FindAPR-Util.cmake in src/cmake.
 # With the default settings(as it does not find apr-config or apu-config 
executables), this will only find the DLLs for APR and APR-util, but not expat 
since that is a transitive dependency of log4cxx.
 # It is possible that the apr-config and apu-config executables add the 
correct flags to build on Windows.  They do not on Linux, as this does not seem 
to be a problem there.
 # In order to run the tests, since we find the directories where the DLLs are, 
we simply prepend those directories to our PATH before running the tests.

 

The possible solutions that I see are as follows:
 # Provide a configuration option to allow the user to input a custom path that 
will be prepended to the PATH before running the tests(this is likely needed 
for the tests to work with zip/grep/sed anyway).
 # Assume that all of the dependencies needed to build and run the tests are in 
a common directory(this is how I run them, with the APR and expat DLLs 
installed in the same directory).
 # Depend on expat directly and get rid of the apr_xml_XXX family of methods(I 
like this as I would like to replace as many uses of APR as possible with 
standard C++ library calls).

> 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, CMakeSettings.json, 
> cmake_settings_using_vs_gui.zip, 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)

Reply via email to