“libarchive”的cmake在OSX Maverick上失败了

时间:2013-12-29 11:15:51

标签: xcode macos cmake

我正在尝试根据official build instructions

使用cmake -G Xcode libarchive编译libarchive

我通过mac端口安装了cmake 2.8.12并使用当前的CMakeList.txt

cmake -G Xcode libarchive输出

-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:177 (SET_TARGET_PROPERTIES):
  set_target_properties called with incorrect number of arguments.

CMake Error at CMakeLists.txt:193 (INSTALL_MAN):
  Unknown CMake command "INSTALL_MAN".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

1 个答案:

答案 0 :(得分:1)

从顶级目录(包含README文件的目录)配置:

$ cmake -G Xcode。

各种目录中的子CMakeLists.txt文件不完整,不能单独使用。