1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- cmake_minimum_required(VERSION 3.17)
- project(gtcvr)
- set(CMAKE_CXX_STANDARD 14)
- #Set include and link file path of libpq for connecting postgresql
- INCLUDE_DIRECTORIES(/usr/include/postgresql)
- LINK_DIRECTORIES(/usr/lib/x86_64-linux-gnu)
- #find_package(libpq-devel REQUIRED)
- #find_path(GD_INCLUDE NAMES libpq-fe.h
- # PATHS /usr/lib/x86_64-linux-gnu /usr/include/postgresql
- # NO_DEFAULT_PATH)
- #find_library(libpq NAMES "libpq.so")
- #message(STATUS "libpq library status:")
- #message(STATUS " library:${libpq-devel_LIBS}")
- #Set include and link file path of libpq for mobus API
- INCLUDE_DIRECTORIES(/usr/local/modbus/include/modbus)
- LINK_DIRECTORIES(/usr/local/modbus/lib)
- #Set include and link file path of all api libraries ,eg:yaml-cpp
- INCLUDE_DIRECTORIES(/usr/local/include)
- LINK_DIRECTORIES(/usr/local/lib/)
- #find C libraries:thread
- find_package(Threads REQUIRED)
- # Find OpenCV, you may need to set OpenCV_DIR variable
- # to the absolute path to the directory containing OpenCVConfig.cmake file
- # via the command line or GUI
- find_package(OpenCV REQUIRED)
- # If the package has been found, several variables will
- # be set, you can find the full list with descriptions
- # in the OpenCVConfig.cmake file.
- # Print some message showing some of them
- message(STATUS "OpenCV library status:")
- message(STATUS " config: ${OpenCV_DIR}")
- message(STATUS " version: ${OpenCV_VERSION}")
- message(STATUS " libraries: ${OpenCV_LIBS}")
- message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
- add_executable(gtcvr main.cpp
- gtbaseparamanalysize.cpp gtbaseparamanalysize.h gtstandardlization.cpp gtstandardlization.h gtcvcore.cpp gtcvcore.h
- gtimgcreator.cpp gtimgcreator.h gtrunconf.h gtcommonkits.cpp gtcommonkits.h
- gtsecondanalysize.cpp gtsecondanalysize.h gtdatasource.cpp gtdatasource.h
- DataMapping/dgns_gtbaseparam.cpp DataMapping/dgns_gtbaseparam.h DataMapping/dgns_gtcvrparam.cpp
- DataMapping/dgns_gtcvrparam.h DataMapping/dgns_gtcvrresult.cpp DataMapping/dgns_gtcvrresult.h
- DataMapping/dgns_gtserverrunlog.cpp DataMapping/dgns_gtserverrunlog.h DataMapping/gtpgcnn.cpp
- DataMapping/gtpgcnn.h DataMapping/gtdgnsdao.cpp DataMapping/gtdgnsdao.h
- Jsonxx/json.hpp Jsonxx/json_basic.hpp Jsonxx/json_exception.hpp Jsonxx/json_iterator.hpp
- Jsonxx/json_parser.hpp Jsonxx/json_serializer.hpp Jsonxx/json_value.hpp
- # Test/jsontest.hpp Test/modbustest.hpp Test/modbustcpserver.cpp
- DataMapping/dgns_gtstandard.cpp DataMapping/dgns_gtstandard.h DataMapping/dgns_gtgktype.cpp
- DataMapping/dgns_gtgktype.h DataMapping/dgns_gtmloutcode.cpp DataMapping/dgns_gtmloutcode.h
- DataMapping/aoid_daily_yield.cpp DataMapping/aoid_daily_yield.h DataMapping/aoid_singlegt_yield.cpp DataMapping/aoid_singlegt_yield.h
- gtselectstandardgt.cpp gtselectstandardgt.h gtaoidcore.cpp gtaoidcore.h DataMapping/gtaoiddao.cpp DataMapping/gtaoiddao.h DataMapping/aoid_singlewell_config.cpp DataMapping/aoid_singlewell_config.h DataMapping/aoid_config_data.cpp DataMapping/aoid_config_data.h DataMapping/aoid_gk_model.cpp DataMapping/aoid_gk_model.h
- md5lib/MD5.cpp md5lib/MD5.h)
- # Link your application with OpenCV libraries
- target_link_libraries(gtcvr PRIVATE ${OpenCV_LIBS} libpq.so libmodbus.so Threads::Threads libyaml-cpp.so)
|