Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,808
    • Issues 3,808
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & 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
  • CMake
  • CMakeCMake
  • Issues
  • #19871

Closed
Open
Created Oct 23, 2019 by Thomas Sharpless@tksharpless

install(TARGETS...) failing with multiple destination directories

CMake 3.12 on Win10 using VC2017 generator.

This code should install debug and release libs to different directories

install(TARGETS paninibase triangle EXPORT paninibaseConfig
  CONFIGURATIONS Release DESTINATION lib/release
  CONFIGURATIONS Debug DESTINATION lib/debug 
)

However both installs actually use the second destination. Generated cmake_install script: cmake_install.cmake

The config files installed by the following command contain the same error.

install(EXPORT paninibaseConfig
  CONFIGURATIONS Debug Release
  DESTINATION cmake
)

Using separate install(TARGET...) commands for debug and release creates the correct lib directories; however then the EXPORT keyword can only be used in one of them, so only one configuration gets exported.

Edited Nov 03, 2019 by Craig Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking