Changeset 99 in pacpussensors for trunk/Alasca
- Timestamp:
- Oct 15, 2015, 2:47:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Alasca/CMakeLists.txt
r37 r99 1 #########################quick start############################################ 2 #cmake ../ -G "CodeBlocks - Unix Makefiles" 3 #make 4 #make install 5 #make clean 6 ################################################################################ 1 7 project(Alasca) 8 set(${PROJECT_NAME}_VERSION_MAJOR 0) 9 set(${PROJECT_NAME}_VERSION_MINOR 1) 10 add_definitions( -DALASCAXT_EXPORTS ) 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME}) 13 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 14 add_definitions (${QT_DEFINITIONS}) 2 15 16 find_package(Qt5Network REQUIRED) 3 17 ################################################################################ 4 add_definitions( -DALASCAXT_EXPORTS ) 5 6 7 8 # ======================================== 9 # Configure qt4 10 # ======================================== 11 if(QT4_FOUND) 12 set(QT_USE_QTXML true) 13 set(QT_USE_QTNETWORK true) 14 include(${QT_USE_FILE}) 15 else() 16 message(ERROR "Qt4 needed") 17 endif() 18 19 # ======================================== 20 # Compiler definitions 21 # ======================================== 22 add_definitions( 23 ${QT_DEFINITIONS} 24 ) 25 26 # ======================================== 27 # Include directories 28 # ======================================== 29 include_directories( 30 ${PROJECT_BINARY_DIR} 31 ${QT_INCLUDE_DIR} 18 # DIRECTORIES 19 include_directories( 20 ${PROJECT_BINARY_DIR} 21 ${QT_INCLUDE_DIR} 22 ${PACPUS_INCLUDE_DIR} 23 ${PACPUS_INCLUDE_DIR}/Pacpus/ 32 24 ) 33 25 … … 35 27 # Link directories 36 28 # ======================================== 37 link_directories( ${PACPUS_LIB_DIR} 29 link_directories( 30 ${PACPUS_LIB_DIR} 38 31 ) 39 32 40 33 41 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 42 43 # ======================================== 44 # List of sources 45 # ======================================== 46 set( 47 PROJECT_SRCS 48 AlascaComponent.cpp 49 AlascaComponent.h 50 AlascaSocket.cpp 51 AlascaSocket.h 34 ################################################################################ 35 # FILES 36 set(PROJECT_HDRS 37 ${EXPORT_HDR} 38 AlascaComponent.h 39 AlascaSocket.h 40 xml/${PROJECT_NAME}.xml 41 xml/${PROJECT_NAME}_d.xml 42 ) 43 set(PROJECT_SRCS 52 44 ${PLUGIN_CPP} 45 AlascaComponent.cpp 46 AlascaSocket.cpp 53 47 ) 54 48 55 # ======================================== 56 # Files to MOC 57 # ======================================== 58 set( 59 FILES_TO_MOC 60 AlascaComponent.h 49 set(FILES_TO_MOC 50 ${PLUGIN_HDR} 51 AlascaComponent.h 61 52 AlascaSocket.h 62 ${PLUGIN_H}63 53 ) 64 54 65 set( 66 UI_FILES 67 55 set(UI_FILES 68 56 ) 69 57 70 # ======================================== 71 # Call MOC 72 # ======================================== 73 qt4_wrap_cpp( 74 PROJECT_MOC_SRCS 58 ################################################################################ 59 # Qt: call moc, uic 60 qt_wrap_cpp(PROJECT_MOC_SRCS 75 61 ${FILES_TO_MOC} 76 62 ) 77 63 78 qt4_wrap_ui( 79 PROJECT_UI_SRCS 64 qt_wrap_ui(PROJECT_UI_SRCS 80 65 ${UI_FILES} 81 66 ) 82 67 83 # ======================================== 84 # Build a library 85 # ======================================== 86 pacpus_add_library( 87 ${PROJECT_NAME} SHARED 68 ################################################################################ 69 # BUILD and LINK 70 pacpus_add_library(${PROJECT_NAME} SHARED 71 ${PROJECT_HDRS} 88 72 ${PROJECT_SRCS} 89 73 ${PROJECT_MOC_SRCS} … … 91 75 ) 92 76 93 message(STATUS ${PACPUS_DEPENDENCIES_LIB} )94 77 78 # ======================================== 79 # Libraries 80 # ======================================== 95 81 set(LIBS 96 82 optimized FileLib debug FileLib_d … … 103 89 ) 104 90 endif() 105 106 # ======================================== 107 # Libraries 108 # ======================================== 109 # All the platform 110 target_link_libraries( 111 ${PROJECT_NAME} 112 ${PACPUS_LIBRARIES} 113 ${QT_LIBRARIES} 114 ${PACPUS_DEPENDENCIES_LIB} 115 ${LIBS} 116 ) 117 91 # LINK 92 target_link_libraries(${PROJECT_NAME} 93 ${PACPUS_LIBRARIES} 94 ${PACPUS_DEPENDENCIES_LIB} 95 ${LIBS} 96 ${QT_LIBRARIES} 97 ) 98 qt5_use_modules(${PROJECT_NAME} Network) 99 ################################################################################ 100 # FOLDERS 118 101 pacpus_folder(${PROJECT_NAME} "components") 119 120 # ======================================== 121 # Install 122 # ======================================== 123 pacpus_install(${PROJECT_NAME}) 102 ################################################################################ 103 # INSTALL 104 pacpus_install(${PROJECT_NAME})
Note:
See TracChangeset
for help on using the changeset viewer.