0
我正在嘗試爲正在處理的庫執行CMake文件。 「項目」非常簡單:2個類,並使用Boost庫。使用CMake構建庫時的錯誤
我已經做了CMakeLists這樣:
project("TFTP Server")
cmake_minimum_required(VERSION 2.8)
set(Boost_DEFAULT_VERSION 1.53)
set(Boost_COMPONENTS "system")
include(FindBoostHelper.cmake)
include_directories(${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS})
add_library(
bin/tftp_server
SHARED
src/tftp_server.cpp
)
# set up the main project
set(tftp_server_SOURCES
${tftp_server_SOURCES}
src/tftp_server.h
src/tftp_server.cpp
src/tftp_connection.h
src/tftp_connection.cpp
)
它發現Boost庫,然後我得到的:
> cmake .. -G "Xcode"
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- system
-- Found boost in /usr/local/include/boost-1_53, using libraries /usr/local/lib/libboost_system-clang-darwin42-mt-1_53.a
-- Configuring done
-- Generating done
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_SONAME_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_LINKER_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_SONAME_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_LINKER_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_SONAME_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_LINKER_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_SONAME_FILE:bin/tftp_server>
Expression syntax not recognized.
CMake Error:
Error evaluating generator expression:
$<TARGET_LINKER_FILE:bin/tftp_server>
Expression syntax not recognized.
沒有 「分享」 選項,它生成項目(但我沒有任何圖書館目標)。
任何關於我在做什麼錯的想法? 我在OSX下使用CMake 2.8.12.2並嘗試構建一個xcode項目。
謝謝!
謝謝!這是問題所在。 –