source: flair-src/trunk/tools/Dbt2csv/CMakeLists.txt @ 302

Last change on this file since 302 was 302, checked in by Sanahuja Guillaume, 3 years ago

modifs nouveau build system

File size: 1.5 KB
Line 
1PROJECT(dbt2csv)
2cmake_minimum_required(VERSION 2.8)
3include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
4
5if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
6warn("${PROJECT_NAME} is broken since changes in FlairGCS/src/file_ui.cpp")
7return()
8
9SET(PROJECT_SOURCE_FILES
10        src/main.cpp
11        ../FlairGCS/src/file_ui.cpp
12)
13
14SET(FILES_TO_MOC
15        ../FlairGCS/src/file_ui.h
16)
17
18FIND_PACKAGE(Qt4 REQUIRED)
19SET(QT_USE_QTGUI TRUE)
20SET(QT_USE_QTMAIN TRUE)
21INCLUDE(${QT_USE_FILE})
22
23QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC})
24
25ADD_DEFINITIONS(${QT_DEFINITIONS})
26
27include_directories(
28        ${CMAKE_SOURCE_DIR}/src
29        ../FlairGCS/src/
30        ${QT_INCLUDE_DIR}
31    ${CMAKE_BINARY_DIR}/generated/
32)
33
34LINK_DIRECTORIES (
35        ${QT_LIBRARY_DIR}
36)
37
38ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES})
39TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} FileLib)
40
41INSTALL(
42        TARGETS ${PROJECT_NAME}
43        RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-install/tools/${ARCH_DIR}
44)
45
46add_custom_target(
47        compile_info
48        COMMAND $ENV{FLAIR_ROOT}/flair-src/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/generated/compile_info.h
49)
50
51add_dependencies(${PROJECT_NAME} compile_info)
52
53SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
54
55else()
56warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
57endif()
Note: See TracBrowser for help on using the repository browser.