doc: update building instructions for macos#2502
Conversation
| as subdirectory build in the project's root directory, and change to that directory. | ||
| From the build directory, configure and build like this: | ||
|
|
||
| ``` | ||
| cmake PATH/TO/SOURCE_DIR | ||
| cmake PATH/TO/MAPPER_ROOT_DIR |
There was a problem hiding this comment.
I understood this as
mkdir ./src/build
cd ./src/build
cmake ..
but it looks like what's meant is
mkdir ./build
cd ./build
cmake ..
isn't it?
There was a problem hiding this comment.
I don't see a significant difference between "source directory" and "project's root directory".
- The first term is actually found in CMake (
CMAKE_SOURCE_DIR,CMAKE_CURRENT_SOURCE_DIR. I admit there is alsoPROJECT_SOURCE_DIRand<ProjectName>_SOURCE_DIR.) - OTOH "root" can refer to installed trees in CMake.
There was a problem hiding this comment.
ok, I've dropped that change.
dg0yt
left a comment
There was a problem hiding this comment.
Thanks for your suggestions. I did a cursory review now.
FTR future updates might consider ninja instead of make, and driving build steps via cmake --build <target>.
| as subdirectory build in the project's root directory, and change to that directory. | ||
| From the build directory, configure and build like this: | ||
|
|
||
| ``` | ||
| cmake PATH/TO/SOURCE_DIR | ||
| cmake PATH/TO/MAPPER_ROOT_DIR |
There was a problem hiding this comment.
I don't see a significant difference between "source directory" and "project's root directory".
- The first term is actually found in CMake (
CMAKE_SOURCE_DIR,CMAKE_CURRENT_SOURCE_DIR. I admit there is alsoPROJECT_SOURCE_DIRand<ProjectName>_SOURCE_DIR.) - OTOH "root" can refer to installed trees in CMake.
|
|
||
| ## Compiling for macos (without OpenOrienteering superbuild) | ||
|
|
||
| `brew` installs `cmake` 4.x but the project requires an older version 3. A legacy |
There was a problem hiding this comment.
Is there an error with CMake 4.x?
There was a problem hiding this comment.
The error I'm seeing is
-- Could NOT find Polyclipping (missing: POLYCLIPPING_INCLUDE_DIR POLYCLIPPING_LIBRARY) (Required is at least version "6.1.3")
CMake Warning at CMakeLists.txt:182 (message):
System polyclipping is missing. Enabling embedded build.
Set Mapper_BUILD_CLIPPER=OFF to disable embedded build.
CMake Error at 3rd-party/clipper/CMakeLists.txt:22 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
-- Configuring incomplete, errors occurred!
actually I think I do get it to work by adding -DCMAKE_POLICY_VERSION_MINIMUM=3.7 as suggested
There was a problem hiding this comment.
I've now updated the one instance of cmake_minimum_required which was causing the error. I'm oblivious about any implications this might or might not have.
Actually, there's a few build warnings about path normalisations which would dissappear by requiring cmake_minimum_required(3.31.0) but I deemed it too bold to propose that now in this PR. Besides, there would be other options to address these comments, besides bumping required deps.
There was a problem hiding this comment.
I see. I use some input variable to close the gap, but this need to eventually land in CMakeLists.txt. Then we don't need it in instructions.
| make | ||
| ``` | ||
|
|
||
| The built application can then be opened with `open src/Mapper.app` |
There was a problem hiding this comment.
Not sure if this useful for the intended audience. (At least it is not specific for brew.)
Otherweise we might also need to mention make install and make package.
There was a problem hiding this comment.
I might not be part of the target audience myself :) but I personally would appreciate anything mentioning these things.
There was a problem hiding this comment.
I've removed the sentence now since you seem not to be thrilled about it :)
Co-authored-by: Kai Pastor <dg0yt@darc.de>
cmakeversion below 3.5 leads to error withcmake4+clipperlibrary