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