2
LINK_DIRECTORIES(${BUILD_DIR}/src)
8
################# compiles resources files ############
9
SET(AngleMeasure_RES ../AngleMeasure.qrc)
10
QT4_ADD_RESOURCES(AngleMeasure_RES_CXX ${AngleMeasure_RES})
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
17
# After this call, AngleMeasure_MOC_SRCS = moc_AngleMeasure.cxx
18
QT4_WRAP_CPP(AngleMeasure_MOC_SRCS ${AngleMeasure_MOC_HDRS})
20
SET(extLinkerOption ${QT_LIBRARIES} ${FreeType2_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
22
############### For building the dynamic library ######################
23
IF(BUILD_DYNAMIC_PLUGINS)
24
ADD_LIBRARY(AngleMeasure MODULE ${AngleMeasure_SRCS} ${AngleMeasure_MOC_SRCS} ${AngleMeasure_RES_CXX})
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")
32
SET_TARGET_PROPERTIES(AngleMeasure PROPERTIES LINK_FLAGS "-enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition" )
33
SET(StelMain stelMain)
38
TARGET_LINK_LIBRARIES(AngleMeasure ${StelMain} ${extLinkerOption})
39
INSTALL(TARGETS AngleMeasure DESTINATION "modules/${PACKAGE}")
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)