[89] | 1 | #################################################
|
---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
---|
| 6 | # |__| \/ \/|__| \/ #
|
---|
| 7 | # #
|
---|
| 8 | #################################################
|
---|
| 9 | project(PacpusSensor)
|
---|
| 10 |
|
---|
| 11 | # ========================================
|
---|
| 12 | # Configure qt4
|
---|
| 13 | # ========================================
|
---|
| 14 | #if(QT4_FOUND)
|
---|
| 15 | # set(QT_USE_QTXML true)
|
---|
| 16 | # include(${QT_USE_FILE})
|
---|
| 17 | #else()
|
---|
| 18 | # message(ERROR "Qt4 needed")
|
---|
| 19 | #endif(QT4_FOUND)
|
---|
| 20 |
|
---|
| 21 | # ========================================
|
---|
| 22 | # Compiler definitions
|
---|
| 23 | # ========================================
|
---|
| 24 | add_definitions(
|
---|
| 25 | ${QT_DEFINITIONS}
|
---|
| 26 | )
|
---|
| 27 |
|
---|
| 28 | # ========================================
|
---|
| 29 | # Include directories
|
---|
| 30 | # ========================================
|
---|
| 31 | include_directories(
|
---|
| 32 | ${PROJECT_BINARY_DIR}
|
---|
| 33 | ${QT_INCLUDE_DIR}
|
---|
| 34 | )
|
---|
[110] | 35 | # ========================================
|
---|
| 36 | # Link directories
|
---|
| 37 | # ========================================
|
---|
| 38 | link_directories(
|
---|
| 39 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
| 40 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
| 41 | )
|
---|
[89] | 42 |
|
---|
| 43 | # ========================================
|
---|
| 44 | # List of sources
|
---|
| 45 | # ========================================
|
---|
| 46 | set(
|
---|
| 47 | PROJECT_SRCS
|
---|
| 48 | src/ui/pacpusmainwindow.cpp
|
---|
| 49 | src/ui/pacpusmainwindow.h
|
---|
| 50 | src/main.cpp
|
---|
| 51 | )
|
---|
| 52 |
|
---|
| 53 | # ========================================
|
---|
| 54 | # Qt4 stuff
|
---|
| 55 | # ========================================
|
---|
| 56 | set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui)
|
---|
| 57 | set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h)
|
---|
| 58 | qt5_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
|
---|
| 59 | qt5_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
|
---|
| 60 | source_group(Main_ui FILES ${PROJECT_SRCS} )
|
---|
| 61 | source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} )
|
---|
| 62 |
|
---|
| 63 | # ========================================
|
---|
| 64 | # Build an executable
|
---|
| 65 | # ========================================
|
---|
| 66 | pacpus_add_executable(
|
---|
| 67 | ${PROJECT_NAME}
|
---|
| 68 | ./src/main.cpp
|
---|
| 69 | ./src/ui/pacpusmainwindow.cpp
|
---|
| 70 | ./src/ui/pacpusmainwindow.h
|
---|
| 71 | ${SENSOR_MOC_SOURCES}
|
---|
| 72 | ${SENSOR_UI_CLASSES}
|
---|
| 73 | )
|
---|
| 74 |
|
---|
| 75 | # ========================================
|
---|
| 76 | # Libraries
|
---|
| 77 | # ========================================
|
---|
| 78 | # All the platform
|
---|
| 79 | target_link_libraries(
|
---|
| 80 | ${PROJECT_NAME}
|
---|
[110] | 81 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 82 | # dbiteplayerlib
|
---|
| 83 | # FileLib
|
---|
| 84 | # PacpusLib
|
---|
| 85 | # PacpusTools
|
---|
| 86 | optimized FileLib debug FileLib_d
|
---|
| 87 | optimized PacpusLib debug PacpusLib_d
|
---|
[89] | 88 | ${QT_LIBRARIES}
|
---|
| 89 | )
|
---|
| 90 | # Windows
|
---|
| 91 | if(WIN32)
|
---|
| 92 | target_link_libraries(
|
---|
| 93 | ${PROJECT_NAME}
|
---|
| 94 | ROAD_TIME
|
---|
| 95 | Winmm
|
---|
| 96 | )
|
---|
| 97 | endif()
|
---|
| 98 |
|
---|
| 99 | # ========================================
|
---|
| 100 | # Install
|
---|
| 101 | # ========================================
|
---|
| 102 | pacpus_install(${PROJECT_NAME})
|
---|
| 103 |
|
---|
| 104 | # ========================================
|
---|
| 105 | # Folder
|
---|
| 106 | # ========================================
|
---|
| 107 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|