Skip to content

doc: update building instructions for macos#2502

Open
joneugster wants to merge 4 commits into
OpenOrienteering:masterfrom
joneugster:doc-install-macos
Open

doc: update building instructions for macos#2502
joneugster wants to merge 4 commits into
OpenOrienteering:masterfrom
joneugster:doc-install-macos

Conversation

@joneugster
Copy link
Copy Markdown

@joneugster joneugster commented May 17, 2026

  • Add instruction for building on macOS
  • Fix: minimum cmake version below 3.5 leads to error with cmake 4+
  • Update stale link for clipper library

Comment thread INSTALL.md Outdated
Comment on lines +80 to +84
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
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 also PROJECT_SOURCE_DIR and <ProjectName>_SOURCE_DIR.)
  • OTOH "root" can refer to installed trees in CMake.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I've dropped that change.

@joneugster joneugster marked this pull request as ready for review May 17, 2026 18:13
Copy link
Copy Markdown
Member

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>.

Comment thread INSTALL.md Outdated
Comment on lines +80 to +84
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 also PROJECT_SOURCE_DIR and <ProjectName>_SOURCE_DIR.)
  • OTOH "root" can refer to installed trees in CMake.

Comment thread INSTALL.md Outdated
Comment thread INSTALL.md Outdated

## Compiling for macos (without OpenOrienteering superbuild)

`brew` installs `cmake` 4.x but the project requires an older version 3. A legacy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an error with CMake 4.x?

Copy link
Copy Markdown
Author

@joneugster joneugster May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread INSTALL.md Outdated
Comment on lines +126 to +129
make
```

The built application can then be opened with `open src/Mapper.app`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

@joneugster joneugster May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might not be part of the target audience myself :) but I personally would appreciate anything mentioning these things.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the sentence now since you seem not to be thrilled about it :)

joneugster and others added 3 commits May 17, 2026 22:52
Co-authored-by: Kai Pastor <dg0yt@darc.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants