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