[127] | 1 | project(VislabComponent)
|
---|
| 2 |
|
---|
[131] | 3 | add_definitions( -DVISLAB_COMPONENT_EXPORTS )
|
---|
| 4 |
|
---|
[127] | 5 | set(${PROJECT_NAME}_VERSION_MAJOR 0)
|
---|
| 6 | set(${PROJECT_NAME}_VERSION_MINOR 1)
|
---|
| 7 | # Create a DLL
|
---|
| 8 |
|
---|
| 9 | find_package(OpenCV REQUIRED)
|
---|
| 10 |
|
---|
| 11 | # Check for OpenCV
|
---|
| 12 | if(NOT OpenCV_FOUND)
|
---|
| 13 | message(FATAL_ERROR "Project ${PROJECT_NAME} requires OpenCV library")
|
---|
| 14 | endif()
|
---|
| 15 |
|
---|
| 16 | ################################################################################
|
---|
| 17 | create_export(EXPORT_HDR ${PROJECT_NAME})
|
---|
| 18 | pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
|
---|
| 19 | add_definitions (${QT_DEFINITIONS})
|
---|
| 20 |
|
---|
| 21 | ################################################################################
|
---|
| 22 | # DIRECTORIES
|
---|
| 23 | include_directories(
|
---|
| 24 | ${PROJECT_BINARY_DIR}
|
---|
| 25 | ${QT_INCLUDE_DIR}
|
---|
| 26 | ${PACPUS_INCLUDE_DIR}
|
---|
[128] | 27 | ${PACPUS_INCLUDE_DIR}/Pacpus/
|
---|
[138] | 28 |
|
---|
[127] | 29 | )
|
---|
[138] | 30 | #"C:/Program Files (x86)/lib3dv/include/lib3dv"
|
---|
[127] | 31 |
|
---|
| 32 | # ========================================
|
---|
| 33 | # Link directories
|
---|
| 34 | # ========================================
|
---|
| 35 | link_directories(
|
---|
| 36 | ${PACPUS_LIB_DIR}
|
---|
| 37 | )
|
---|
| 38 |
|
---|
| 39 | ################################################################################
|
---|
| 40 | # FILES
|
---|
| 41 | set(PROJECT_HDRS
|
---|
| 42 | ${EXPORT_HDR}
|
---|
| 43 | VislabComponent.hpp
|
---|
| 44 | VislabCamera.hpp
|
---|
| 45 | DiskWriter.h
|
---|
| 46 | Display.h
|
---|
| 47 | VislabImageProcessor.h
|
---|
[138] | 48 | Outputter.h
|
---|
[127] | 49 | )
|
---|
| 50 | set(PROJECT_SRCS
|
---|
| 51 | ${PLUGIN_CPP}
|
---|
| 52 | VislabComponent.cpp
|
---|
| 53 | VislabCamera.cpp
|
---|
| 54 | DiskWriter.cpp
|
---|
| 55 | Display.cpp
|
---|
| 56 | VislabImageProcessor.cpp
|
---|
[138] | 57 | Outputter.cpp
|
---|
[127] | 58 | )
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | set(FILES_TO_MOC
|
---|
| 62 | ${PLUGIN_HDR}
|
---|
| 63 | VislabComponent.hpp
|
---|
| 64 | Display.h
|
---|
| 65 | )
|
---|
| 66 |
|
---|
| 67 | set(UI_FILES
|
---|
| 68 | )
|
---|
| 69 |
|
---|
| 70 | ################################################################################
|
---|
| 71 | # Qt: call moc, uic
|
---|
| 72 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
| 73 | ${FILES_TO_MOC}
|
---|
| 74 | )
|
---|
| 75 |
|
---|
| 76 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
| 77 | ${UI_FILES}
|
---|
| 78 | )
|
---|
| 79 |
|
---|
| 80 | ################################################################################
|
---|
| 81 | # BUILD and LINK
|
---|
| 82 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
| 83 | ${PROJECT_HDRS}
|
---|
| 84 | ${PROJECT_SRCS}
|
---|
| 85 | ${PROJECT_MOC_SRCS}
|
---|
| 86 | ${PROJECT_UI_SRCS}
|
---|
| 87 | )
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | # ========================================
|
---|
| 91 | # Libraries
|
---|
| 92 | # ========================================
|
---|
| 93 | set(LIBS
|
---|
| 94 | optimized FileLib debug FileLib_d
|
---|
| 95 | optimized PacpusLib debug PacpusLib_d
|
---|
| 96 | optimized PacpusTools debug PacpusTools_d
|
---|
| 97 | )
|
---|
| 98 | if (WIN32)
|
---|
| 99 | list(APPEND LIBS
|
---|
| 100 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 101 | )
|
---|
| 102 | endif()
|
---|
| 103 | # LINK
|
---|
| 104 | target_link_libraries(${PROJECT_NAME}
|
---|
| 105 | ${PACPUS_LIBRARIES}
|
---|
| 106 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 107 | ${LIBS}
|
---|
| 108 | ${QT_LIBRARIES}
|
---|
| 109 | ${OpenCV_LIBS}
|
---|
[138] | 110 |
|
---|
[127] | 111 | )
|
---|
[138] | 112 | #"C:/Program Files (x86)/lib3dv/lib/3dv.lib"
|
---|
[127] | 113 | ################################################################################
|
---|
| 114 | # FOLDERS
|
---|
| 115 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 116 | ################################################################################
|
---|
| 117 | # INSTALL
|
---|
| 118 | pacpus_install(${PROJECT_NAME})
|
---|