0
我的項目中包含以下CMakeLists.txt
(在我的「項目」文件夾中)文件。通過CMake/CMakeLists.txt包含Xcode項目的特徵庫
# define new project
PROJECT(SETUPMARKERTEST)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(UNIX)
# Set static build for GLFW
SET(BUILD_SHED_LIBS OFF)
ADD_SUBDIRECTORY(ext/glfw-3.1.1)
# Set shared lib build for the rest
SET(BUILD_SHARED_LIBS ON)
# Find dependencies
SET(EIGEN_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/ext/Eigen-3.1.2")
FIND_PACKAGE(OpenCV REQUIRED)
# Set header and source files
SET(MAR_Test_SOURCES
src/main.cpp
src/MarkerTracker.h src/MarkerTracker.cpp
src/PoseEstimation.h src/PoseEstimation.cpp
)
# define executable
ADD_EXECUTABLE(${PROJECT_NAME} ${MAR_Test_SOURCES})
# define additional include directories and linking targets
INCLUDE_DIRECTORIES("ext/glfw-3.1.1/include" ${EIGEN_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS} glfw ${OPENGL_glu_LIBRARY} ${GLFW_LIBRARIES})
而我的Eigen文件夾位於「project/ext/Eigen/3.1.2/Eigen /」中。 不知怎的,當我建立了我的項目的Xcode(在「項目/ buildXcode /」與Cmake .. -G "Xcode"
)並運行它時,Xcode拋出我的錯誤:
所以我想有一些錯誤,我CMakeLists.txt
,不幸的是我收到該文件和我對CMake是新手,因此並沒有自己寫,也不是我對CMake非常熟練。
你知道是什麼原因導致錯誤,你能修復我的項目運行Eigen庫的CMakeLists.txt
嗎?