123456789101112131415161718192021 |
- cmake_minimum_required(VERSION 2.8)
- # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
- project(ccats-cli)
- # 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)
- 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)
- # use pkg-config to find readline as it doesnt provide cmake files
- find_package(PkgConfig REQUIRED)
- pkg_check_modules(READLINE REQUIRED readline)
- pkg_check_modules(JSONCPP REQUIRED jsoncpp)
- find_package(Threads)
- find_package(Boost 1.67 REQUIRED COMPONENTS system program_options)
- include_directories(${Boost_INCLUDE_DIR} ${JSONCPP_INCLUDEDIR} include)
- target_link_libraries(ccats-cli PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${READLINE_LIBRARIES} ${JSONCPP_LIBRARIES})
|