| 1 | #################################################
|
|---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
|---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
|---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
|---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
|---|
| 6 | # |__| \/ \/|__| \/ #
|
|---|
| 7 | # #
|
|---|
| 8 | #################################################
|
|---|
| 9 | project(dbiteplayerlib)
|
|---|
| 10 |
|
|---|
| 11 | # ========================================
|
|---|
| 12 | # Configure qt4
|
|---|
| 13 | # ========================================
|
|---|
| 14 | if(QT4_FOUND)
|
|---|
| 15 | set(QT_USE_QTXML true)
|
|---|
| 16 | set(QT_USE_QTNETWORK TRUE)
|
|---|
| 17 | include(${QT_USE_FILE})
|
|---|
| 18 | else()
|
|---|
| 19 | message(ERROR "Qt4 needed")
|
|---|
| 20 | endif(QT4_FOUND)
|
|---|
| 21 |
|
|---|
| 22 | # ========================================
|
|---|
| 23 | # Compiler definitions
|
|---|
| 24 | # ========================================
|
|---|
| 25 | add_definitions(
|
|---|
| 26 | -DDBITE_PLAYER_EXPORTS
|
|---|
| 27 | ${QT_DEFINITIONS}
|
|---|
| 28 | )
|
|---|
| 29 |
|
|---|
| 30 | # ========================================
|
|---|
| 31 | # Include directories
|
|---|
| 32 | # ========================================
|
|---|
| 33 | include_directories(
|
|---|
| 34 | ${CMAKE_BINARY_DIR}/DBITEPlayer
|
|---|
| 35 | ${QT_INCLUDE_DIR}
|
|---|
| 36 | )
|
|---|
| 37 |
|
|---|
| 38 | # ========================================
|
|---|
| 39 | # List of sources
|
|---|
| 40 | # ========================================
|
|---|
| 41 | set(
|
|---|
| 42 | PROJECT_SRCS
|
|---|
| 43 | ./DbtPlyEngine.cpp
|
|---|
| 44 | ./DbtPlyUserInterface.cpp
|
|---|
| 45 | ./DbtPlyEngineStateChart.cpp
|
|---|
| 46 | ./DbtPlyFileManager.cpp
|
|---|
| 47 | ./DbtPlyTrigger.cpp
|
|---|
| 48 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
|---|
| 49 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
|---|
| 50 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
|---|
| 51 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
|
|---|
| 52 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
|---|
| 53 | )
|
|---|
| 54 |
|
|---|
| 55 | # ========================================
|
|---|
| 56 | # Files to MOC
|
|---|
| 57 | # ========================================
|
|---|
| 58 | set(
|
|---|
| 59 | FILES_TO_MOC
|
|---|
| 60 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
|
|---|
| 61 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
|
|---|
| 62 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
|
|---|
| 63 | ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
|
|---|
| 64 | )
|
|---|
| 65 |
|
|---|
| 66 | # ========================================
|
|---|
| 67 | # Call MOC
|
|---|
| 68 | # ========================================
|
|---|
| 69 | qt4_wrap_cpp(
|
|---|
| 70 | PROJECT_MOC_SRCS
|
|---|
| 71 | ${FILES_TO_MOC}
|
|---|
| 72 | )
|
|---|
| 73 |
|
|---|
| 74 | # ========================================
|
|---|
| 75 | # Directories architecture
|
|---|
| 76 | # ========================================
|
|---|
| 77 | SOURCE_GROUP(Core FILES ${PROJECT_SRCS} )
|
|---|
| 78 | SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS})
|
|---|
| 79 |
|
|---|
| 80 | # ========================================
|
|---|
| 81 | # Build a library
|
|---|
| 82 | # ========================================
|
|---|
| 83 | pacpus_add_library(
|
|---|
| 84 | ${PROJECT_NAME} SHARED
|
|---|
| 85 | ${PROJECT_SRCS}
|
|---|
| 86 | ${PROJECT_MOC_SRCS}
|
|---|
| 87 | )
|
|---|
| 88 |
|
|---|
| 89 | # ========================================
|
|---|
| 90 | # Libraries
|
|---|
| 91 | # ========================================
|
|---|
| 92 | # All platform
|
|---|
| 93 | target_link_libraries(
|
|---|
| 94 | ${PROJECT_NAME}
|
|---|
| 95 | ${PACPUS_DEPENDENCIES_LIB}
|
|---|
| 96 | PacpusLib
|
|---|
| 97 | FileLib
|
|---|
| 98 | ${QT_LIBRARIES}
|
|---|
| 99 | )
|
|---|
| 100 | # Windows platform
|
|---|
| 101 | if(WIN32)
|
|---|
| 102 | target_link_libraries(
|
|---|
| 103 | ${PROJECT_NAME}
|
|---|
| 104 | ROAD_TIME
|
|---|
| 105 | Winmm
|
|---|
| 106 | )
|
|---|
| 107 | endif()
|
|---|
| 108 |
|
|---|
| 109 | # ========================================
|
|---|
| 110 | # Install
|
|---|
| 111 | # ========================================
|
|---|
| 112 | pacpus_install(${PROJECT_NAME})
|
|---|
| 113 |
|
|---|
| 114 | # ========================================
|
|---|
| 115 | # Folder
|
|---|
| 116 | # ========================================
|
|---|
| 117 | pacpus_folder(${PROJECT_NAME} "libraries")
|
|---|