[1] | 1 | project(Alasca)
|
---|
[11] | 2 |
|
---|
[1] | 3 | ################################################################################
|
---|
| 4 | add_definitions( -DALASCAXT_EXPORTS )
|
---|
| 5 |
|
---|
[37] | 6 |
|
---|
| 7 |
|
---|
[1] | 8 | # ========================================
|
---|
[37] | 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 | # ========================================
|
---|
[1] | 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}
|
---|
| 32 | )
|
---|
| 33 |
|
---|
| 34 | # ========================================
|
---|
| 35 | # Link directories
|
---|
| 36 | # ========================================
|
---|
[2] | 37 | link_directories( ${PACPUS_LIB_DIR}
|
---|
[1] | 38 | )
|
---|
| 39 |
|
---|
[2] | 40 |
|
---|
[1] | 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
|
---|
| 52 | ${PLUGIN_CPP}
|
---|
| 53 | )
|
---|
| 54 |
|
---|
| 55 | # ========================================
|
---|
| 56 | # Files to MOC
|
---|
| 57 | # ========================================
|
---|
| 58 | set(
|
---|
| 59 | FILES_TO_MOC
|
---|
| 60 | AlascaComponent.h
|
---|
| 61 | AlascaSocket.h
|
---|
| 62 | ${PLUGIN_H}
|
---|
| 63 | )
|
---|
| 64 |
|
---|
| 65 | set(
|
---|
| 66 | UI_FILES
|
---|
| 67 |
|
---|
| 68 | )
|
---|
| 69 |
|
---|
| 70 | # ========================================
|
---|
| 71 | # Call MOC
|
---|
| 72 | # ========================================
|
---|
[37] | 73 | qt4_wrap_cpp(
|
---|
[1] | 74 | PROJECT_MOC_SRCS
|
---|
| 75 | ${FILES_TO_MOC}
|
---|
| 76 | )
|
---|
| 77 |
|
---|
[37] | 78 | qt4_wrap_ui(
|
---|
[1] | 79 | PROJECT_UI_SRCS
|
---|
| 80 | ${UI_FILES}
|
---|
| 81 | )
|
---|
| 82 |
|
---|
| 83 | # ========================================
|
---|
| 84 | # Build a library
|
---|
| 85 | # ========================================
|
---|
| 86 | pacpus_add_library(
|
---|
| 87 | ${PROJECT_NAME} SHARED
|
---|
| 88 | ${PROJECT_SRCS}
|
---|
| 89 | ${PROJECT_MOC_SRCS}
|
---|
| 90 | ${PROJECT_UI_SRCS}
|
---|
| 91 | )
|
---|
| 92 |
|
---|
[2] | 93 | message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
|
---|
| 94 |
|
---|
[9] | 95 | set(LIBS
|
---|
| 96 | optimized FileLib debug FileLib_d
|
---|
| 97 | optimized PacpusLib debug PacpusLib_d
|
---|
| 98 | optimized PacpusTools debug PacpusTools_d
|
---|
| 99 | )
|
---|
| 100 | if (WIN32)
|
---|
| 101 | list(APPEND LIBS
|
---|
| 102 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 103 | )
|
---|
| 104 | endif()
|
---|
| 105 |
|
---|
[1] | 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}
|
---|
[9] | 115 | ${LIBS}
|
---|
[1] | 116 | )
|
---|
| 117 |
|
---|
[11] | 118 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 119 |
|
---|
[1] | 120 | # ========================================
|
---|
| 121 | # Install
|
---|
| 122 | # ========================================
|
---|
| 123 | pacpus_install(${PROJECT_NAME})
|
---|