CMakeLists.txt 899 B

123456789101112131415161718192021
  1. cmake_minimum_required(VERSION 2.8)
  2. # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  3. project(ccats-cli)
  4. # add_executable(ccats-cli src/main.cpp src/ioman.cpp src/machineioman.cpp src/userioman.cpp src/base64.cpp src/netman.cpp src/cmdman.cpp src/fileman.cpp)
  5. add_executable(ccats-cli src/main.cpp src/ioman.cpp src/machineioman.cpp src/userioman.cpp src/base64.cpp src/cmdman.cpp src/fileman.cpp)
  6. # use pkg-config to find readline as it doesnt provide cmake files
  7. find_package(PkgConfig REQUIRED)
  8. pkg_check_modules(READLINE REQUIRED readline)
  9. pkg_check_modules(JSONCPP REQUIRED jsoncpp)
  10. find_package(Threads)
  11. find_package(Boost 1.67 REQUIRED COMPONENTS system program_options)
  12. include_directories(${Boost_INCLUDE_DIR} ${JSONCPP_INCLUDEDIR} include)
  13. target_link_libraries(ccats-cli PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${READLINE_LIBRARIES} ${JSONCPP_LIBRARIES})