Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4.2k
    • Issues 4.2k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #16212
Closed
Open
Issue created Jul 23, 2016 by Silvio Traversaro@traversaroContributor

cmake-packages documentation suggests to install CMake config files in a directory that is not found automatically in Windows

The cmake-packages documentation suggests to install CMake config files to lib/cmake/<package_name> [1], however that path is not searched for by find_package on Windows when the package is installed in the default CMAKE_INSTALL_PREFIX [3] .

A more multi-platform alternative to suggest would be:

if(WIN32 AND NOT CYGWIN)
     set(ConfigPackageLocation CMake)
else()
     set(ConfigPackageLocation lib/cmake/ClimbingStats)
endif()

This is a common pitfall for libraries developed on *nix system to work correctly out of the box in Windows [3][4][5], so fixing it in the main CMake documentation would be highly beneficial.

[1] : https://gitlab.kitware.com/cmake/cmake/blame/v3.6.1/Help/manual/cmake-packages.7.rst#L327

[2] : https://cmake.org/cmake/help/v3.6/command/find_package.html#command:find_package

[3] : https://github.com/flexible-collision-library/fcl/pull/116#discussion_r58436663

[4] : https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/63/fix-logic-of-installation-of-cmake/diff

[5] : https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/63/fix-logic-of-installation-of-cmake/diff

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking