Changeset 370 in pacpusframework


Ignore:
Timestamp:
04/04/16 13:29:55 (8 years ago)
Author:
cerichar
Message:

correction CMakeLists.txt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.2.x/src/dbcDecriptor/CMakeLists.txt

    r331 r370  
    1 PROJECT(PacpusDBCDecriptor)
    2 ################################################################################
    3 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    4 
    5 # ========================================
    6 # Configure qt4
    7 # ========================================
    8 FIND_PACKAGE(Qt4 REQUIRED)
    9 IF(QT4_FOUND)
    10         SET(QT_USE_QTGUI TRUE)
    11         INCLUDE(${QT_USE_FILE})
    12 ELSE()
    13         MESSAGE(ERROR " QT4 NEEDED")
    14 ENDIF()
    15 
    16 IF(WIN32)
    17         LINK_LIBRARIES(${QT_QTMAIN_LIBRARY})
    18         SET(GUI_TYPE WIN32)
    19 ENDIF(WIN32)
     1#################################################
     2#   ___________    ____ ______  __ __  _____    #
     3#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
     4#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
     5#   |   __(____  /\___  >   __/|____//____  >   #
     6#   |__|       \/     \/|__|              \/    #
     7#                                               #
     8#################################################
     9project(PacpusDBCDecriptor)
    2010
    2111# ========================================
    2212# Compiler definitions
    2313# ========================================
    24 ADD_DEFINITIONS(
    25         ${QT_DEFINITIONS}
     14add_definitions(${QT_DEFINITIONS})
     15
     16# ========================================
     17# Pre-configuration of the compiler
     18# ========================================
     19find_package(Pacpus REQUIRED)
     20# Includes directories
     21if(PACPUS_FOUND)
     22include_directories(
     23  ${PACPUS_DEPENDENCIES_INC}
     24  ${PACPUS_INCLUDE_DIR}
    2625)
     26# Compiler flags coming from PacpusDependencies and PacpusPlatforms
     27add_definitions(${PACPUS_DEFINITIONS})
     28endif(PACPUS_FOUND)
    2729
    2830# ========================================
    2931# Include directories
    3032# ========================================
    31 INCLUDE_DIRECTORIES(
    32         ${PROJECT_BINARY_DIR}
    33         ${QT_INCLUDE_DIR}
     33include_directories(
     34    ${CMAKE_BINARY_DIR}/DBITEPlayer
     35    ${QT_INCLUDE_DIR}
     36)
     37
     38# ========================================
     39# Link directories
     40# ========================================
     41link_directories(
     42    ${PROJECT_BINARY_DIR}/../PacpusLib
     43    ${PROJECT_BINARY_DIR}/../FileLib
     44    ${PROJECT_BINARY_DIR}/../DBITEPlayerLib
     45        ${PROJECT_BINARY_DIR}/../PacpusTools
     46        ${PROJECT_BINARY_DIR}/../RoadTime
    3447)
    3548
     
    3750# List of sources
    3851# ========================================
    39 SET(
    40         PROJECT_SRCS
    41         src/mainwindow.cpp
    42         src/main.cpp
    43         src/mainwindow.h
    44         src/structure.h
    45         ../ico/heudiasycIco.rc
     52set(PROJECT_HDRS
     53
     54)
     55set(PROJECT_SRCS
     56    src/mainwindow.cpp
     57    src/main.cpp
     58    src/mainwindow.h
     59    src/structure.h
     60    #../ico/heudiasycIco.rc
    4661)
    4762
     
    5065# ========================================
    5166SET(
    52         FILES_TO_MOC
    53         src/mainwindow.h
     67    FILES_TO_MOC
     68    src/mainwindow.h
    5469)
    5570
    5671SET(
    57         UI_FILES
    58         src/mainwindow.ui   
     72    UI_FILES
     73    src/mainwindow.ui   
    5974)
    6075
     
    6277# Call MOC
    6378# ========================================
    64 QT4_WRAP_CPP(
    65         PROJECT_MOC_SRCS
    66         ${FILES_TO_MOC}
     79QT_WRAP_CPP(
     80    PROJECT_MOC_SRCS
     81    ${FILES_TO_MOC}
    6782)
    6883
    69 QT4_WRAP_UI(
    70         PROJECT_UI_SRCS
    71         ${UI_FILES}
     84QT_WRAP_UI(
     85    PROJECT_UI_SRCS
     86    ${UI_FILES}
    7287)
    7388
     
    7691# ========================================
    7792pacpus_add_executable(
    78         ${PROJECT_NAME}
    79         ${GUI_TYPE}
    80         ${PROJECT_SRCS}
    81         ${PROJECT_MOC_SRCS}
    82         ${PROJECT_UI_SRCS}
     93    ${PROJECT_NAME}
     94    ${GUI_TYPE}
     95    ${PROJECT_SRCS}
     96    ${PROJECT_MOC_SRCS}
     97    ${PROJECT_UI_SRCS}
     98
    8399)
    84100
    85101# ========================================
    86 # Libraries
     102# Libraries & Dependencies
    87103# ========================================
    88 TARGET_LINK_LIBRARIES(
    89         ${PROJECT_NAME}
    90         ${QT_LIBRARIES}
     104
     105set(OPT_LIBRARIES
     106    optimized dbiteplayerlib debug dbiteplayerlib_d
     107    optimized FileLib debug FileLib_d
     108    optimized PacpusLib debug PacpusLib_d
     109)
     110
     111# Windows platform
     112if(WIN32)
     113    LIST(APPEND OPT_LIBRARIES
     114        optimized ROAD_TIME debug ROAD_TIME_d
     115        Winmm
     116    )
     117endif()
     118
     119if(UNIX)
     120    LIST(APPEND OPT_LIBRARIES
     121        pthread
     122    )
     123endif()
     124
     125# All the platform
     126target_link_libraries(
     127    ${PROJECT_NAME}
     128    ${QT_LIBRARIES}
     129    ${OPT_LIBRARIES}
     130    ${PACPUS_DEPENDENCIES_LIB}
    91131)
    92132
     
    95135# ========================================
    96136pacpus_install(${PROJECT_NAME})
     137
     138# ========================================
     139# Folder
     140# ========================================
     141pacpus_folder(${PROJECT_NAME} "tools")
Note: See TracChangeset for help on using the changeset viewer.