Last change
on this file since 283 was 234, checked in by Sanahuja Guillaume, 7 years ago |
create file oscket only when necessary
|
File size:
1.5 KB
|
Rev | Line | |
---|
[40] | 1 | PROJECT(dbt2csv)
|
---|
[12] | 2 | cmake_minimum_required(VERSION 2.8)
|
---|
| 3 | include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
|
---|
| 4 |
|
---|
[107] | 5 | if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
|
---|
[234] | 6 | warn("${PROJECT_NAME} is broken since changes in FlairGCS/src/file_ui.cpp")
|
---|
| 7 | return()
|
---|
[107] | 8 |
|
---|
[12] | 9 | SET(PROJECT_SOURCE_FILES
|
---|
| 10 | src/main.cpp
|
---|
| 11 | ../FlairGCS/src/file_ui.cpp
|
---|
| 12 | )
|
---|
| 13 |
|
---|
| 14 | SET(FILES_TO_MOC
|
---|
| 15 | ../FlairGCS/src/file_ui.h
|
---|
| 16 | )
|
---|
| 17 |
|
---|
| 18 | FIND_PACKAGE(Qt4 REQUIRED)
|
---|
| 19 | SET(QT_USE_QTGUI TRUE)
|
---|
| 20 | SET(QT_USE_QTMAIN TRUE)
|
---|
| 21 | INCLUDE(${QT_USE_FILE})
|
---|
| 22 |
|
---|
| 23 | QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC})
|
---|
| 24 |
|
---|
| 25 | ADD_DEFINITIONS(${QT_DEFINITIONS})
|
---|
| 26 |
|
---|
| 27 | include_directories(
|
---|
| 28 | ${CMAKE_SOURCE_DIR}/src
|
---|
| 29 | ../FlairGCS/src/
|
---|
| 30 | ${QT_INCLUDE_DIR}
|
---|
| 31 | )
|
---|
| 32 |
|
---|
| 33 | LINK_DIRECTORIES (
|
---|
| 34 | ${QT_LIBRARY_DIR}
|
---|
| 35 | )
|
---|
| 36 |
|
---|
| 37 | ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES})
|
---|
| 38 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} FileLib)
|
---|
| 39 |
|
---|
| 40 | INSTALL(
|
---|
| 41 | TARGETS ${PROJECT_NAME}
|
---|
| 42 | RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR}
|
---|
| 43 | )
|
---|
| 44 |
|
---|
| 45 | add_custom_target(
|
---|
[45] | 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
|
---|
[12] | 48 | )
|
---|
| 49 |
|
---|
[45] | 50 | add_dependencies(${PROJECT_NAME} compile_info)
|
---|
[12] | 51 |
|
---|
| 52 | SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
---|
[107] | 53 |
|
---|
| 54 | else()
|
---|
| 55 | warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
|
---|
| 56 | endif()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.