Bug 59685 - [Patchset] Fix CMake builds for Visual Studio
Summary: [Patchset] Fix CMake builds for Visual Studio
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.5-HEAD
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-06-09 16:28 UTC by Jacob Champion
Modified: 2018-03-27 16:57 UTC (History)
0 users



Attachments
0001: use CMAKE_REQUIRED_INCLUDES to find APR macros (1.28 KB, patch)
2016-06-09 16:29 UTC, Jacob Champion
Details | Diff
0002: use generator expressions to find output files (5.20 KB, patch)
2016-06-09 16:29 UTC, Jacob Champion
Details | Diff
0003: quote installation paths (2.78 KB, patch)
2016-06-09 16:30 UTC, Jacob Champion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Champion 2016-06-09 16:28:55 UTC
A group of related fixes to fix the CMake build for Visual Studio (2015). Tested against trunk and 2.4.20.

0001: On my machine, the current implementation isn't able to correctly discover APR features (like APU_HAVE_CRYPTO). Setting CMAKE_REQUIRED_INCLUDES to APR's include directory seems to fix this problem.

0002: The current implementation assumes .lib and related files will always be placed directly inside the build root. But Visual Studio is a multi-configuration generator, which means that output files may be placed in a per-configuration subdirectory. To fix this, use CMake generator expressions instead of hardcoding the paths to these files.

0003: Calls to Perl during installation did not quote the file path arguments, so the installation would fail if the target path contained spaces (e.g. "Program Files"). Quote all of these paths.
Comment 1 Jacob Champion 2016-06-09 16:29:20 UTC
Created attachment 33933 [details]
0001: use CMAKE_REQUIRED_INCLUDES to find APR macros
Comment 2 Jacob Champion 2016-06-09 16:29:47 UTC
Created attachment 33934 [details]
0002: use generator expressions to find output files
Comment 3 Jacob Champion 2016-06-09 16:30:15 UTC
Created attachment 33935 [details]
0003: quote installation paths
Comment 4 Jacob Champion 2016-07-12 20:02:45 UTC
Trunked in r1752331, r1752332, and r1752333. Proposed for 2.4.x.
Comment 5 Christophe JAILLET 2018-03-27 16:57:50 UTC
Backported in 2.4.x in r1770674