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")
|
---|
| 6 |
|
---|
[12] | 7 | SET(PROJECT_SOURCE_FILES
|
---|
| 8 | src/main.cpp
|
---|
| 9 | ../FlairGCS/src/file_ui.cpp
|
---|
| 10 | )
|
---|
| 11 |
|
---|
| 12 | SET(FILES_TO_MOC
|
---|
| 13 | ../FlairGCS/src/file_ui.h
|
---|
| 14 | )
|
---|
| 15 |
|
---|
| 16 | FIND_PACKAGE(Qt4 REQUIRED)
|
---|
| 17 | SET(QT_USE_QTGUI TRUE)
|
---|
| 18 | SET(QT_USE_QTMAIN TRUE)
|
---|
| 19 | INCLUDE(${QT_USE_FILE})
|
---|
| 20 |
|
---|
| 21 | QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC})
|
---|
| 22 |
|
---|
| 23 | ADD_DEFINITIONS(${QT_DEFINITIONS})
|
---|
| 24 |
|
---|
| 25 | include_directories(
|
---|
| 26 | ${CMAKE_SOURCE_DIR}/src
|
---|
| 27 | ../FlairGCS/src/
|
---|
| 28 | ${QT_INCLUDE_DIR}
|
---|
| 29 | )
|
---|
| 30 |
|
---|
| 31 | LINK_DIRECTORIES (
|
---|
| 32 | ${QT_LIBRARY_DIR}
|
---|
| 33 | )
|
---|
| 34 |
|
---|
| 35 | ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES})
|
---|
| 36 | TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} FileLib)
|
---|
| 37 |
|
---|
| 38 | INSTALL(
|
---|
| 39 | TARGETS ${PROJECT_NAME}
|
---|
| 40 | RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR}
|
---|
| 41 | )
|
---|
| 42 |
|
---|
| 43 | add_custom_target(
|
---|
[45] | 44 | compile_info
|
---|
| 45 | 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] | 46 | )
|
---|
| 47 |
|
---|
[45] | 48 | add_dependencies(${PROJECT_NAME} compile_info)
|
---|
[12] | 49 |
|
---|
| 50 | SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
---|
[107] | 51 |
|
---|
| 52 | else()
|
---|
| 53 | warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
|
---|
| 54 | endif()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.