CMakeTutorial
CMakeTutorial copied to clipboard
CMake中文实战教程
教程写得非常棒。在[Installation](https://github.com/BrightXiaoHan/CMakeTutorial/tree/master/Installation) 中提到了“在其他项目中可以使用 ``` find_package(MyMath 1.0) target_linked_library(otherapp MyMath::mymath) ``` 我在自己的工程中,这样编写的cmake ``` cmake_minimum_required(VERSION 3.0) project(hi VERSION 0.1) add_executable(hi main.cpp) set(MyMath_DIR /opt/repos/cmake-tuts-repos/CMakeTutorial-master/Installation/build/mymath/lib/cmake/MyMath/) find_package(MyMath) if(MyMath_FOUND) message("MyMath found") target_include_directories(hi PUBLIC ${MyMath_INCLUDE_DIR}) message("include dir ${MyMath_INCLUDE_DIR}") target_link_libraries(hi...
请问find_package(GLOG)成功后如何用cmakelist.txt中把这个库的位置打印出来?我试着用message打印,好像只有message(${GLOG_FOUND})的值为1,你页面上说的GLOG_INCLUDE_DIR、GLOG_INCLUDES、GLOG_LIBRARY、GLOG_LIBRARIES这几个值都为空,但我想把这库的位置打印出来,请问我该怎么办呢