~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to plugins/AngleMeasure/src/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-02-15 20:48:39 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100215204839-u3qgbv60rho997yk
Tags: 0.10.3-0ubuntu1
* New upstream release.
  - fixes intel rendering bug (LP: #480553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
INCLUDE_DIRECTORIES(.)
 
2
LINK_DIRECTORIES(${BUILD_DIR}/src)
 
3
 
 
4
SET(AngleMeasure_SRCS
 
5
  AngleMeasure.hpp
 
6
  AngleMeasure.cpp)
 
7
 
 
8
################# compiles resources files ############
 
9
SET(AngleMeasure_RES ../AngleMeasure.qrc)
 
10
QT4_ADD_RESOURCES(AngleMeasure_RES_CXX ${AngleMeasure_RES})
 
11
 
 
12
# Add here all the files which require moc compilation
 
13
# that is, all the headers with SIGNAL/SLOTS/PLUGIN_INTERFACE etc..
 
14
SET(AngleMeasure_MOC_HDRS
 
15
 AngleMeasure.hpp)
 
16
 
 
17
# After this call, AngleMeasure_MOC_SRCS = moc_AngleMeasure.cxx
 
18
QT4_WRAP_CPP(AngleMeasure_MOC_SRCS ${AngleMeasure_MOC_HDRS})
 
19
 
 
20
SET(extLinkerOption ${QT_LIBRARIES} ${FreeType2_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
 
21
 
 
22
############### For building the dynamic library ######################
 
23
IF(BUILD_DYNAMIC_PLUGINS)
 
24
        ADD_LIBRARY(AngleMeasure MODULE ${AngleMeasure_SRCS} ${AngleMeasure_MOC_SRCS} ${AngleMeasure_RES_CXX})
 
25
        IF(APPLE)
 
26
                FIND_LIBRARY(OPENGL_LIBRARY OpenGL)
 
27
                MARK_AS_ADVANCED(OPENGL_LIBRARY)
 
28
                SET_TARGET_PROPERTIES(AngleMeasure PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" SUFFIX ".dylib")
 
29
        ENDIF(APPLE)
 
30
 
 
31
        IF(WIN32)
 
32
                SET_TARGET_PROPERTIES(AngleMeasure PROPERTIES LINK_FLAGS "-enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition" )
 
33
                SET(StelMain stelMain)
 
34
        ELSE(WIN32)
 
35
                SET(StelMain )
 
36
        ENDIF(WIN32)
 
37
 
 
38
        TARGET_LINK_LIBRARIES(AngleMeasure ${StelMain} ${extLinkerOption})
 
39
        INSTALL(TARGETS AngleMeasure DESTINATION "modules/${PACKAGE}")
 
40
ENDIF()
 
41
 
 
42
############### For building the static library ######################
 
43
IF(BUILD_STATIC_PLUGINS)
 
44
        ADD_LIBRARY(AngleMeasure-static STATIC ${AngleMeasure_SRCS} ${AngleMeasure_MOC_SRCS} ${AngleMeasure_RES_CXX})
 
45
        # The library target "AngleMeasure-static" has a default OUTPUT_NAME of "AngleMeasure-static", so change it.
 
46
        SET_TARGET_PROPERTIES(AngleMeasure-static PROPERTIES OUTPUT_NAME "AngleMeasure")
 
47
        TARGET_LINK_LIBRARIES(AngleMeasure-static ${extLinkerOption})
 
48
        SET_TARGET_PROPERTIES(AngleMeasure-static PROPERTIES COMPILE_FLAGS "-fPIC -DQT_STATICPLUGIN")
 
49
        ADD_DEPENDENCIES(AllStaticPlugins AngleMeasure-static)
 
50
ENDIF()
 
51