CMake RelWithDebInfo links to Debug libs

前端 未结 3 1118
旧巷少年郎
旧巷少年郎 2021-02-04 10:04

I have a project which links to half a dozen libraries, among them OpenCV.
Since Release variant is crashing, while Debug is working fine (just a lot slower), I wanted to co

3条回答
  •  甜味超标
    2021-02-04 10:51

    Solution: add to CMakeLists.txt, after the call to FIND_PACKAGE(OpenCV):

    set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
    

提交回复
热议问题