~ps-jenkins/dee-qt/latestsnapshot-3.3+14.04.20140116-0ubuntu1

« back to all changes in this revision

Viewing changes to modules/Dee/CMakeLists.txt

  • Committer: Michał Sawicz
  • Date: 2013-01-31 19:01:52 UTC
  • mfrom: (65.1.21 qt4-and-qt5)
  • Revision ID: michal.sawicz@canonical.com-20130131190152-pnlsxjnv92rymaux
build for both qt4 and qt5

rename the libs to libdee-qt{4,5}-3
rename QML bindings to qml{1,2}-dee-3
bump version number
rename the QML module to Dee
version the QML module accordingly
split the QML module out into subdir
split the tests into subdir

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
if (WITHQT5)
 
3
  find_package(Qt5Quick REQUIRED)
 
4
  set(OUR_QT_QUICK_LIB ${Qt5Quick_LIBRARIES})
 
5
 
 
6
  get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
 
7
  exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)
 
8
  file(TO_CMAKE_PATH "${QT_IMPORTS_DIR}" QT_IMPORTS_DIR)
 
9
 
 
10
  set(OUR_QT_QUICK_INCLUDE ${Qt5Quick_INCLUDE_DIRS})
 
11
  LIST(APPEND QT_PKGCONFIG_DEPENDENCIES "Qt5Quick")
 
12
else ()
 
13
  set(OUR_QT_QUICK_LIB ${QT_QTDECLARATIVE_LIBRARIES})
 
14
  set(OUR_QT_QUICK_INCLUDE ${QT_QTDECLARATIVE_INCLUDE_DIR})
 
15
  LIST(APPEND QT_PKGCONFIG_DEPENDENCIES "QtDeclarative")
 
16
endif ()
 
17
 
 
18
set(DeePlugin_SRCS
 
19
    plugin.cpp
 
20
    )
 
21
 
 
22
add_library(DeePlugin SHARED ${DeePlugin_SRCS})
 
23
 
 
24
target_link_libraries(DeePlugin
 
25
  ${DEE_QT_LIBNAME}
 
26
  ${OUR_QT_QUICK_LIB}
 
27
  )
 
28
 
 
29
include_directories(
 
30
    ${CMAKE_CURRENT_BINARY_DIR}
 
31
    ${OUR_QT_QUICK_INCLUDE}
 
32
    )
 
33
 
 
34
# copy qmldir file into build directory for shadow builds
 
35
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
 
36
    DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
 
37
    )
 
38
 
 
39
install(TARGETS DeePlugin
 
40
    LIBRARY DESTINATION ${QT_IMPORTS_DIR}/Dee.${SONAME}
 
41
    )
 
42
 
 
43
install(FILES qmldir
 
44
    DESTINATION ${QT_IMPORTS_DIR}/Dee.${SONAME}
 
45
    )