[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
|
---|
[331] | 40 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
|
---|
[89] | 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
|
---|
[331] | 65 | ../ico/heudiasycIco.rc
|
---|
[89] | 66 | )
|
---|
| 67 |
|
---|
| 68 | # ========================================
|
---|
| 69 | # Libraries & Dependencies
|
---|
| 70 | # ========================================
|
---|
[120] | 71 |
|
---|
| 72 | set(OPT_LIBRARIES
|
---|
| 73 | optimized dbiteplayerlib debug dbiteplayerlib_d
|
---|
| 74 | optimized FileLib debug FileLib_d
|
---|
| 75 | optimized PacpusLib debug PacpusLib_d
|
---|
| 76 | )
|
---|
| 77 |
|
---|
[111] | 78 | # Windows platform
|
---|
| 79 | if(WIN32)
|
---|
[120] | 80 | LIST(APPEND OPT_LIBRARIES
|
---|
[111] | 81 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 82 | Winmm
|
---|
[120] | 83 | )
|
---|
[111] | 84 | endif()
|
---|
| 85 |
|
---|
[150] | 86 | if(UNIX)
|
---|
| 87 | LIST(APPEND OPT_LIBRARIES
|
---|
[151] | 88 | pthread
|
---|
| 89 | )
|
---|
[150] | 90 | endif()
|
---|
| 91 |
|
---|
[89] | 92 | # All the platform
|
---|
| 93 | target_link_libraries(
|
---|
| 94 | ${PROJECT_NAME}
|
---|
| 95 | ${QT_LIBRARIES}
|
---|
[120] | 96 | ${OPT_LIBRARIES}
|
---|
[111] | 97 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
[89] | 98 | )
|
---|
| 99 |
|
---|
| 100 | # ========================================
|
---|
| 101 | # Install
|
---|
| 102 | # ========================================
|
---|
| 103 | pacpus_install(${PROJECT_NAME})
|
---|
| 104 |
|
---|
| 105 | # ========================================
|
---|
| 106 | # Folder
|
---|
| 107 | # ========================================
|
---|
| 108 | pacpus_folder(${PROJECT_NAME} "tools")
|
---|