soul.at.peace Ответов: 0

Установка Mfast на windows с помощью инструмента cmake-gui


Я пытаюсь использовать протокол mFast for FastFix на своей машине с windows, но не могу установить его с помощью cmake-gui.exe я использую Visual studio 2010 на Windows Server 2003.

CMAKE-LISTS.txt

file (GLOB headers "*.h") ## retrieve all header files in current directory
file (GLOB sources "*.cpp")     ## retrieve all source files in current directory     I had added Executable path and Library path.

file (GLOB instruction_headers "instructions/*.h") ## retrieve all header files in instructions directory
file (GLOB instruction_sources "instructions/*.cpp")     ## retrieve all source files in instructions directory

SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

set(mfast_SRCS  ${sources} ${instruction_sources} ${headers} ${instruction_headers})

add_library(mfast_static STATIC ${mfast_SRCS})
target_include_directories(mfast_static PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)

if (UNIX)
  set_target_properties(mfast_static PROPERTIES OUTPUT_NAME mfast)
endif()
set_target_properties(mfast_static PROPERTIES COMPILE_FLAGS -DMFAST_STATIC_DEFINE)

install(TARGETS mfast_static
        EXPORT  mFASTTargets
        RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
        ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib)

set(MFAST_STATIC_LIBRARIES ${MFAST_STATIC_LIBRARIES} mfast_static CACHE INTERNAL "")


if (BUILD_SHARED_LIBS)
  add_library(mfast SHARED ${mfast_SRCS})

  if (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.12")
    target_compile_definitions(mfast INTERFACE "-DMFAST_DYN_LINK")
  endif (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.12")

  if (CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
    set_target_properties(mfast PROPERTIES COMPILE_FLAGS -fvisibility=hidden)
  endif()
  set_target_properties(mfast PROPERTIES
                        VERSION "${MFAST_VERSION}"
                        SOVERSION "${MFAST_SOVERSION}")

  install(TARGETS mfast
          EXPORT  mFASTTargets
          RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
          LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib)

  set(MFAST_SHARED_LIBRARIES ${MFAST_SHARED_LIBRARIES} mfast CACHE INTERNAL "")
endif (BUILD_SHARED_LIBS)

add_subdirectory (coder)
add_subdirectory (xml_parser)
add_subdirectory (json)

if (BUILD_SQLITE3)
    add_subdirectory (sqlite3)
endif(BUILD_SQLITE3)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
        DESTINATION "${INSTALL_INCLUDE_DIR}"
        FILES_MATCHING PATTERN "*.h")


файл журнала ошибок

CMake Error at mfast/CMakeLists.txt:20 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "mfast_static".


CMake Error at mfast/coder/CMakeLists.txt:28 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "mfast_coder_static".


CMake Error at mfast/xml_parser/CMakeLists.txt:22 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "mfast_xml_parser_static".


CMake Error at mfast/json/CMakeLists.txt:19 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "mfast_json_static".


CMake Error at fast_type_gen/CMakeLists.txt:18 (install):
  install TARGETS given no RUNTIME DESTINATION for executable target
  "fast_type_gen".


CMake Warning (dev) at CMakeLists.txt:5 (set):
  Cannot set "FAST_TYPE_GEN_INSTALL_LOCATION": current scope has no parent.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:7 (install):
  install FILES given no DESTINATION!


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

    cmake_minimum_required(VERSION 3.12)

  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.

Configuring incomplete, errors occurred!


Что я уже пробовал:

Added Executable Path and Library Installed Boost-library 1.63 and added in Path,But found no luck whatsoever as you can see i am getting static library file error. Thanking in Advance

Richard MacCutchan

Посмотрите на сообщения об ошибках и предлагаемое решение. Вы также можете ознакомиться с документацией.

0 Ответов