CMakeLists.txt 863 B

12345678910111213141516171819202122
  1. cmake_minimum_required(VERSION 2.8.12)
  2. project(CCats-GUI LANGUAGES CXX)
  3. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  4. set(CMAKE_AUTOMOC ON)
  5. set(CMAKE_AUTORCC ON)
  6. set(CMAKE_CXX_STANDARD 11)
  7. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  8. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  9. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../.cmake_modules/")
  10. find_package(Threads)
  11. find_package(Qt5 COMPONENTS Core Quick Widgets REQUIRED)
  12. find_package(Jsoncpp REQUIRED)
  13. add_definitions(-DQT_NO_DEBUG_OUTPUT)
  14. add_executable(${PROJECT_NAME} src/main.cpp src/cmdmanager.cpp src/qmlhandler.cpp src/jsonhandler.cpp src/qml.qrc src/config.cpp src/climanager.cpp include/qmlhandler.h)
  15. include_directories(${JSONCPP_INCLUDE_DIRS} include)
  16. target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${JSONCPP_LIBRARIES} Qt5::Core Qt5::Quick Qt5::Widgets)