[89] | 1 | #################################################
|
---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
---|
| 6 | # |__| \/ \/|__| \/ #
|
---|
| 7 | # #
|
---|
| 8 | #################################################
|
---|
| 9 | project(DBITEPlayer)
|
---|
| 10 |
|
---|
| 11 | # ========================================
|
---|
| 12 | # Compiler definitions
|
---|
| 13 | # ========================================
|
---|
[163] | 14 | add_definitions(${QT_DEFINITIONS})
|
---|
[89] | 15 |
|
---|
| 16 | # ========================================
|
---|
| 17 | # Include directories
|
---|
| 18 | # ========================================
|
---|
| 19 | include_directories(
|
---|
| 20 | ${CMAKE_BINARY_DIR}/DBITEPlayer
|
---|
| 21 | ${QT_INCLUDE_DIR}
|
---|
| 22 | )
|
---|
| 23 |
|
---|
| 24 | # ========================================
|
---|
[110] | 25 | # Link directories
|
---|
| 26 | # ========================================
|
---|
| 27 | link_directories(
|
---|
| 28 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
| 29 | ${PROJECT_BINARY_DIR}/../FileLib
|
---|
[111] | 30 | ${PROJECT_BINARY_DIR}/../DBITEPlayerLib
|
---|
[123] | 31 | ${PROJECT_BINARY_DIR}/../PacpusTools
|
---|
| 32 | ${PROJECT_BINARY_DIR}/../RoadTime
|
---|
[110] | 33 | )
|
---|
| 34 |
|
---|
| 35 | # ========================================
|
---|
[89] | 36 | # List of sources
|
---|
| 37 | # ========================================
|
---|
[163] | 38 | set(PROJECT_HDRS
|
---|
[89] | 39 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
|
---|
| 40 | ${PACPUS_INCLUDE_DIR}/Pacpus//kernel/ComponentBase.h
|
---|
| 41 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
|
---|
| 42 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
|
---|
| 43 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
|
---|
| 44 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
|
---|
| 45 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
|
---|
| 46 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
|
---|
| 47 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
|
---|
| 48 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
|
---|
[163] | 49 | )
|
---|
| 50 | set(PROJECT_SRCS
|
---|
[89] | 51 | ./ComponentBase.cpp
|
---|
| 52 | ./ComponentFactoryBase.cpp
|
---|
| 53 | ./ComponentManager.cpp
|
---|
| 54 | ./Log.cpp
|
---|
| 55 | ./XmlComponentConfig.cpp
|
---|
| 56 | ./XmlConfigFile.cpp
|
---|
| 57 | )
|
---|
| 58 |
|
---|
| 59 | # ========================================
|
---|
| 60 | # Build an executable
|
---|
| 61 | # ========================================
|
---|
| 62 | pacpus_add_executable(
|
---|
| 63 | ${PROJECT_NAME}
|
---|
| 64 | ./src/main.cpp
|
---|
| 65 | )
|
---|
| 66 |
|
---|
| 67 | # ========================================
|
---|
| 68 | # Libraries & Dependencies
|
---|
| 69 | # ========================================
|
---|
[120] | 70 |
|
---|
| 71 | set(OPT_LIBRARIES
|
---|
| 72 | optimized dbiteplayerlib debug dbiteplayerlib_d
|
---|
| 73 | optimized FileLib debug FileLib_d
|
---|
| 74 | optimized PacpusLib debug PacpusLib_d
|
---|
| 75 | )
|
---|
| 76 |
|
---|
[111] | 77 | # Windows platform
|
---|
| 78 | if(WIN32)
|
---|
[120] | 79 | LIST(APPEND OPT_LIBRARIES
|
---|
[111] | 80 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 81 | Winmm
|
---|
[120] | 82 | )
|
---|
[111] | 83 | endif()
|
---|
| 84 |
|
---|
[150] | 85 | if(UNIX)
|
---|
| 86 | LIST(APPEND OPT_LIBRARIES
|
---|
[151] | 87 | pthread
|
---|
| 88 | )
|
---|
[150] | 89 | endif()
|
---|
| 90 |
|
---|
[89] | 91 | # All the platform
|
---|
| 92 | target_link_libraries(
|
---|
| 93 | ${PROJECT_NAME}
|
---|
| 94 | ${QT_LIBRARIES}
|
---|
[120] | 95 | ${OPT_LIBRARIES}
|
---|
[111] | 96 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
[89] | 97 | )
|
---|
| 98 |
|
---|
| 99 | # ========================================
|
---|
| 100 | # Install
|
---|
| 101 | # ========================================
|
---|
| 102 | pacpus_install(${PROJECT_NAME})
|
---|
| 103 |
|
---|
| 104 | # ========================================
|
---|
| 105 | # Folder
|
---|
| 106 | # ========================================
|
---|
| 107 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|