[1] | 1 | project(Alasca)
|
---|
| 2 | ################################################################################
|
---|
| 3 | add_definitions( -DALASCAXT_EXPORTS )
|
---|
| 4 |
|
---|
| 5 | # ========================================
|
---|
| 6 | # Configure qt4
|
---|
| 7 | # ========================================
|
---|
| 8 | if(QT4_FOUND)
|
---|
| 9 | set(QT_USE_QTXML true)
|
---|
| 10 | set(QT_USE_QTNETWORK true)
|
---|
| 11 | include(${QT_USE_FILE})
|
---|
| 12 | else()
|
---|
| 13 | message(ERROR "Qt4 needed")
|
---|
| 14 | endif()
|
---|
| 15 |
|
---|
| 16 | # ========================================
|
---|
| 17 | # Compiler definitions
|
---|
| 18 | # ========================================
|
---|
| 19 | add_definitions(
|
---|
| 20 | ${QT_DEFINITIONS}
|
---|
| 21 | )
|
---|
| 22 |
|
---|
| 23 | # ========================================
|
---|
| 24 | # Include directories
|
---|
| 25 | # ========================================
|
---|
| 26 | include_directories(
|
---|
| 27 | ${PROJECT_BINARY_DIR}
|
---|
| 28 | ${QT_INCLUDE_DIR}
|
---|
| 29 | )
|
---|
| 30 |
|
---|
| 31 | # ========================================
|
---|
| 32 | # Link directories
|
---|
| 33 | # ========================================
|
---|
[2] | 34 | link_directories( ${PACPUS_LIB_DIR}
|
---|
[1] | 35 | )
|
---|
| 36 |
|
---|
[2] | 37 | message (STATUS ${PACPUS_LIB_DIR})
|
---|
| 38 |
|
---|
[1] | 39 | pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
|
---|
| 40 |
|
---|
| 41 | # ========================================
|
---|
| 42 | # List of sources
|
---|
| 43 | # ========================================
|
---|
| 44 | set(
|
---|
| 45 | PROJECT_SRCS
|
---|
| 46 | AlascaComponent.cpp
|
---|
| 47 | AlascaComponent.h
|
---|
| 48 | AlascaSocket.cpp
|
---|
| 49 | AlascaSocket.h
|
---|
| 50 | ${PLUGIN_CPP}
|
---|
| 51 | )
|
---|
| 52 |
|
---|
| 53 | # ========================================
|
---|
| 54 | # Files to MOC
|
---|
| 55 | # ========================================
|
---|
| 56 | set(
|
---|
| 57 | FILES_TO_MOC
|
---|
| 58 | AlascaComponent.h
|
---|
| 59 | AlascaSocket.h
|
---|
| 60 | ${PLUGIN_H}
|
---|
| 61 | )
|
---|
| 62 |
|
---|
| 63 | set(
|
---|
| 64 | UI_FILES
|
---|
| 65 |
|
---|
| 66 | )
|
---|
| 67 |
|
---|
| 68 | # ========================================
|
---|
| 69 | # Call MOC
|
---|
| 70 | # ========================================
|
---|
| 71 | qt4_wrap_cpp(
|
---|
| 72 | PROJECT_MOC_SRCS
|
---|
| 73 | ${FILES_TO_MOC}
|
---|
| 74 | )
|
---|
| 75 |
|
---|
| 76 | qt4_wrap_ui(
|
---|
| 77 | PROJECT_UI_SRCS
|
---|
| 78 | ${UI_FILES}
|
---|
| 79 | )
|
---|
| 80 |
|
---|
| 81 | # ========================================
|
---|
| 82 | # Build a library
|
---|
| 83 | # ========================================
|
---|
| 84 | pacpus_add_library(
|
---|
| 85 | ${PROJECT_NAME} SHARED
|
---|
| 86 | ${PROJECT_SRCS}
|
---|
| 87 | ${PROJECT_MOC_SRCS}
|
---|
| 88 | ${PROJECT_UI_SRCS}
|
---|
| 89 | )
|
---|
| 90 |
|
---|
[2] | 91 | message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
|
---|
| 92 |
|
---|
[1] | 93 | # ========================================
|
---|
| 94 | # Libraries
|
---|
| 95 | # ========================================
|
---|
| 96 | # All the platform
|
---|
| 97 | target_link_libraries(
|
---|
| 98 | ${PROJECT_NAME}
|
---|
| 99 | ${PACPUS_LIBRARIES}
|
---|
| 100 | ${QT_LIBRARIES}
|
---|
| 101 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
[2] | 102 | PacpusTools
|
---|
[1] | 103 | )
|
---|
| 104 |
|
---|
| 105 | # ========================================
|
---|
| 106 | # Install
|
---|
| 107 | # ========================================
|
---|
| 108 | pacpus_install(${PROJECT_NAME})
|
---|
| 109 |
|
---|