我无法使用CMakeLists将外部库assimp包含到我的项目中。
我通过以下方式开展工作:
add_subdirectory(${CMAKE_SOURCE_DIR}/external/assimp-3.1.1-win-binaries)
include_directories(${CMAKE_SOURCE_DIR}/external/assimp-3.1.1-win-binaries/include)
target_link_libraries(MyProject assimp)
但我不想使用add_subdirectoy,因为它将它添加到我的IDE中。 (Visual Studios 2013)
为什么我不能只包含assimp include目录并将其链接到我的项目中?
include_directories(${CMAKE_SOURCE_DIR}/external/assimp-3.1.1-win-binaries/include)
link_directories(${CMAKE_SOURCE_DIR}/external/assimp-3.1.1-win-binaries/lib32/)
target_link_libraries(MyProject assimp)