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

Last change on this file since 297 was 234, checked in by Sanahuja Guillaume, 7 years ago

create file oscket only when necessary

File size: 1.5 KB
Line 
1PROJECT(dbt2csv)
2cmake_minimum_required(VERSION 2.8)
3include($ENV{FLAIR_ROOT}/flair-dev/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)
32
33LINK_DIRECTORIES (
34 ${QT_LIBRARY_DIR}
35)
36
37ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES})
38TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} FileLib)
39
40INSTALL(
41 TARGETS ${PROJECT_NAME}
42 RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR}
43)
44
45add_custom_target(
46 compile_info
47 COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
48)
49
50add_dependencies(${PROJECT_NAME} compile_info)
51
52SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
53
54else()
55warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
56endif()
Note: See TracBrowser for help on using the repository browser.