[99] | 1 | #########################quick start##################################
|
---|
| 2 | #cmake ../ -G "CodeBlocks - Unix Makefiles"
|
---|
| 3 | #make
|
---|
| 4 | #make install
|
---|
| 5 | #make clean
|
---|
| 6 | ################################################################################
|
---|
| 7 | project(TestDualShock)
|
---|
| 8 | add_definitions( -DDUALSHOCKXT_EXPORTS )
|
---|
| 9 | set(${PROJECT_NAME}_VERSION_MAJOR 0)
|
---|
| 10 | set(${PROJECT_NAME}_VERSION_MINOR 1)
|
---|
| 11 | ################################################################################
|
---|
| 12 | create_export(EXPORT_HDR ${PROJECT_NAME})
|
---|
| 13 | pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
|
---|
| 14 | ################################################################################
|
---|
| 15 | # DIRECTORIES
|
---|
| 16 | include_directories(
|
---|
| 17 | ${PROJECT_BINARY_DIR}
|
---|
| 18 | ${QT_INCLUDE_DIR}
|
---|
| 19 | ${PACPUS_INCLUDE_DIR}
|
---|
| 20 | ${PACPUS_INCLUDE_DIR}/Pacpus/
|
---|
| 21 | )
|
---|
| 22 |
|
---|
| 23 | # ========================================
|
---|
| 24 | # Link directories
|
---|
| 25 | # ========================================
|
---|
| 26 | link_directories(
|
---|
| 27 | ${PACPUS_LIB_DIR}
|
---|
| 28 | )
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | ################################################################################
|
---|
| 32 | # FILES
|
---|
| 33 | set(PROJECT_HDRS
|
---|
| 34 | ${EXPORT_HDR}
|
---|
| 35 | dualshock.h
|
---|
| 36 | controller.h
|
---|
[100] | 37 | #xml/${PROJECT_NAME}.xml
|
---|
| 38 | #xml/${PROJECT_NAME}_d.xml
|
---|
[99] | 39 | )
|
---|
| 40 | set(PROJECT_SRCS
|
---|
| 41 | ${PLUGIN_CPP}
|
---|
| 42 | dualshock.cpp
|
---|
| 43 | controller.cpp
|
---|
| 44 | )
|
---|
| 45 |
|
---|
| 46 | set(FILES_TO_MOC
|
---|
| 47 | ${PLUGIN_HDR}
|
---|
| 48 | controller.h
|
---|
| 49 | )
|
---|
| 50 |
|
---|
| 51 | set(UI_FILES
|
---|
| 52 | )
|
---|
| 53 |
|
---|
| 54 | ################################################################################
|
---|
| 55 | # Qt: call moc, uic
|
---|
| 56 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
| 57 | ${FILES_TO_MOC}
|
---|
| 58 | )
|
---|
| 59 |
|
---|
| 60 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
| 61 | ${UI_FILES}
|
---|
| 62 | )
|
---|
| 63 |
|
---|
| 64 | ################################################################################
|
---|
| 65 | # BUILD and LINK
|
---|
| 66 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
| 67 | ${PROJECT_HDRS}
|
---|
| 68 | ${PROJECT_SRCS}
|
---|
| 69 | ${PROJECT_MOC_SRCS}
|
---|
| 70 | ${PROJECT_UI_SRCS}
|
---|
| 71 | )
|
---|
| 72 |
|
---|
| 73 |
|
---|
| 74 | # ========================================
|
---|
| 75 | # Libraries
|
---|
| 76 | # ========================================
|
---|
| 77 | set(LIBS
|
---|
| 78 | optimized FileLib debug FileLib_d
|
---|
| 79 | optimized PacpusLib debug PacpusLib_d
|
---|
| 80 | optimized PacpusTools debug PacpusTools_d
|
---|
| 81 | )
|
---|
| 82 | if (WIN32)
|
---|
| 83 | list(APPEND LIBS
|
---|
| 84 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 85 | )
|
---|
| 86 | endif()
|
---|
| 87 |
|
---|
| 88 | # LINK
|
---|
| 89 | target_link_libraries(${PROJECT_NAME}
|
---|
| 90 | ${PACPUS_LIBRARIES}
|
---|
| 91 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 92 | ${LIBS})
|
---|
| 93 |
|
---|
| 94 | ################################################################################
|
---|
| 95 | # FOLDERS
|
---|
| 96 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 97 |
|
---|
| 98 | ################################################################################
|
---|
| 99 | # INSTALL
|
---|
| 100 | pacpus_install(${PROJECT_NAME})
|
---|