CMake: how to get target location for install rule

后端 未结 2 1902
慢半拍i
慢半拍i 2021-01-18 02:57

I have a CMakeLists.txt that does this:

get_target_property(myloc mytarget LOCATION)

It used to work fine, but CMake 3.0 deprecated using <

2条回答
  •  清酒与你
    2021-01-18 03:11

    You can try to use/re-enable the < v3.0 behaviour.

    cmake_policy(SET CMP0026 OLD)
    

    See cmake-policies

提交回复
热议问题