CMakeLists.txt   CMakeLists.txt 
skipping to change at line 259 skipping to change at line 259
core/external/qtcompress/qzipreader.h core/external/qtcompress/qzipreader.h
core/external/qtcompress/qzipwriter.h core/external/qtcompress/qzipwriter.h
) )
ENDIF() ENDIF()
IF(ENABLE_SCRIPTING) IF(ENABLE_SCRIPTING)
SET(stellarium_lib_SRCS ${stellarium_lib_SRCS} SET(stellarium_lib_SRCS ${stellarium_lib_SRCS}
scripting/StelScriptOutput.hpp scripting/StelScriptOutput.hpp
scripting/StelScriptOutput.cpp scripting/StelScriptOutput.cpp
scripting/StelScriptMgr.cpp scripting/StelScriptMgr.cpp
scripting/StratoscriptPreprocessor.cpp
scripting/StelScriptMgr.hpp scripting/StelScriptMgr.hpp
scripting/ScreenImageMgr.hpp scripting/ScreenImageMgr.hpp
scripting/ScreenImageMgr.cpp scripting/ScreenImageMgr.cpp
scripting/StelMainScriptAPI.cpp scripting/StelMainScriptAPI.cpp
scripting/StelMainScriptAPI.hpp scripting/StelMainScriptAPI.hpp
scripting/StelMainScriptAPIProxy.cpp scripting/StelMainScriptAPIProxy.cpp
scripting/StelMainScriptAPIProxy.hpp scripting/StelMainScriptAPIProxy.hpp
) )
ENDIF() ENDIF()
skipping to change at line 356 skipping to change at line 355
gui/scriptConsole.ui) gui/scriptConsole.ui)
ENDIF() ENDIF()
ENDIF() ENDIF()
QT5_WRAP_UI(stellarium_UIS_H ${stellarium_UIS}) QT5_WRAP_UI(stellarium_UIS_H ${stellarium_UIS})
# compiles resources files # compiles resources files
SET(stellarium_gui_RES ${CMAKE_SOURCE_DIR}/data/gui/guiRes.qrc) SET(stellarium_gui_RES ${CMAKE_SOURCE_DIR}/data/gui/guiRes.qrc)
QT5_ADD_RESOURCES(stellarium_gui_RES_CXX ${stellarium_gui_RES}) QT5_ADD_RESOURCES(stellarium_gui_RES_CXX ${stellarium_gui_RES})
SET(extLinkerOption ${QT_QTSCRIPT_LIBRARY} ${OPENGL_LIBRARIES}) SET(extLinkerOption ${extLinkerOption} ${QT_QTSCRIPT_LIBRARY} ${OPEN
GL_LIBRARIES})
# Compile the static library SET(stellarium_lib_SRCS ${stellarium_lib_SRCS} ${stellarium_gui_SRCS
ADD_LIBRARY(StelGuiLib STATIC ${stellarium_gui_SRCS} ${stellarium_UI } ${stellarium_UIS_H} ${stellarium_gui_RES_CXX})
S_H} ${stellarium_gui_RES_CXX})
TARGET_LINK_LIBRARIES(StelGuiLib ${StelMain} ${extLinkerOption})
QT5_USE_MODULES(StelGuiLib Core Gui Widgets Network OpenGL Script De
clarative)
SET_TARGET_PROPERTIES(StelGuiLib PROPERTIES COMPILE_FLAGS "-DQT_STAT
ICPLUGIN")
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS
_LIBRARIES} StelGuiLib)
ADD_DEPENDENCIES(AllStaticPlugins StelGuiLib)
ENDIF() ENDIF()
########################################################################### ################## ########################################################################### ##################
################################ No GUI plugin compilation ################ ################## ################################ No GUI plugin compilation ################ ##################
########################################################################### ################## ########################################################################### ##################
IF (GUI_MODE STREQUAL "None") IF (GUI_MODE STREQUAL "None")
SET(stellarium_nogui_SRCS ADD_DEFINITIONS(-DNO_GUI)
noGui/StelNoGui.hpp
noGui/StelNoGui.cpp)
ADD_LIBRARY(StelNoGuiLib STATIC ${stellarium_nogui_SRCS})
TARGET_LINK_LIBRARIES(StelNoGuiLib ${extLinkerOption})
SET_TARGET_PROPERTIES(StelNoGuiLib PROPERTIES COMPILE_FLAGS "-DQT_ST
ATICPLUGIN")
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS
_LIBRARIES} StelNoGuiLib)
ADD_DEPENDENCIES(AllStaticPlugins StelNoGuiLib)
ENDIF()
###########################################################################
##################
############################# External GUI plugin compilation #############
##################
###########################################################################
##################
IF (GUI_MODE STREQUAL "External")
SET(EXTERNAL_GUI_SRC_PATH "../../MyGui/" CACHE PATH "The location of
the plugin main directory i.e. the one containing the top level CMakeLists
.txt")
ADD_SUBDIRECTORY( ${EXTERNAL_GUI_SRC_PATH} externalGui )
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS_
LIBRARIES} ${CMAKE_BINARY_DIR}/src/externalGui/src/libExternalGui.a)
SET(EXTERNAL_GUI_PLUGIN_EXTRALIBS CACHE STRING "Additionnal link opt
ions needed for the GUI plugin")
SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ${EXTERNAL_GUI_
PLUGIN_EXTRALIBS})
ENDIF() ENDIF()
########################################################################### #################### ########################################################################### ####################
################## Static plugins need to be known by the file StelMainView .cpp at compilation time ################## Static plugins need to be known by the file StelApp.cpp at compilation time
################## so add the definitions to the compilation. ################## so add the definitions to the compilation.
################## Also add the full path to the .a libraries at compilatio n time. ################## Also add the full path to the .a libraries at compilatio n time.
### demo plugins ### ### demo plugins ###
FOREACH(NAME ${STELLARIUM_PLUGINS}) FOREACH(NAME ${STELLARIUM_PLUGINS})
STRING(TOUPPER ${NAME} NAME_UP) STRING(TOUPPER ${NAME} NAME_UP)
IF(USE_PLUGIN_${NAME_UP}) IF(USE_PLUGIN_${NAME_UP})
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_ PLUGINS_LIBRARIES} ${NAME}-static) SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_ PLUGINS_LIBRARIES} ${NAME}-static)
ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_${NAME_UP}) ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_${NAME_UP})
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
IF(USE_PLUGIN_LOGBOOK) IF(USE_PLUGIN_LOGBOOK)
SET(QT_USE_QTSQL TRUE) SET(QT_USE_QTSQL TRUE)
ENDIF() ENDIF()
IF(USE_PLUGIN_SVMT)
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS
_LIBRARIES} ${CMAKE_BINARY_DIR}/plugins/svmt/src/${CMAKE_CFG_INTDIR}/libSVM
T.a)
IF(APPLE)
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC
_PLUGINS_LIBRARIES} "-framework QtDeclarative")
ELSE(APPLE)
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC
_PLUGINS_LIBRARIES} ${QT_LIBRARY_DIR}/libQtDeclarative.so)
ENDIF(APPLE)
ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_SVMT)
ENDIF()
IF(USE_PLUGIN_TELESCOPECONTROL) IF(USE_PLUGIN_TELESCOPECONTROL)
# WinSock library # WinSock library
IF(WIN32) IF(WIN32)
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS _LIBRARIES} ws2_32) SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS _LIBRARIES} ws2_32)
ENDIF() ENDIF()
ENDIF() ENDIF()
########################################################################### ################## ########################################################################### ##################
################################ Build main program ####################### ################## ################################ Build main program ####################### ##################
########################################################################### ################## ########################################################################### ##################
SET(extLinkerOption ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES}) SET(extLinkerOption ${extLinkerOption} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES })
IF(WIN32 AND NOT MSVC) IF(WIN32 AND NOT MSVC)
# TODO: Test if winsock is still necessary if the Telescope Control plug-in is disabled. # TODO: Test if winsock is still necessary if the Telescope Control plug-in is disabled.
# Because including it here seems to duplicate STELLARIUM_STATIC_PLUGINS_LI BRARIES # Because including it here seems to duplicate STELLARIUM_STATIC_PLUGINS_LI BRARIES
SET(extLinkerOption ${extLinkerOption} libwinmm.a -lws2_32) SET(extLinkerOption ${extLinkerOption} libwinmm.a -lws2_32)
ENDIF() ENDIF()
IF(WIN32 AND ENABLE_WINDOWS_EXE_ICON) IF(WIN32 AND ENABLE_WINDOWS_EXE_ICON)
IF(RC_COMPILER_PATH) IF(RC_COMPILER_PATH)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/stellarium-rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/stellarium-rc.o
COMMAND ${RC_COMPILER_PATH} ${CMAKE_SOURCE_DIR}/data COMMAND ${RC_COMPILER_PATH} ${CMAKE_SOURCE_DIR}/
/stellarium.rc ${CMAKE_BINARY_DIR}/stellarium-rc.o data/stellarium.rc ${CMAKE_BINARY_DIR}/stellarium-rc.o
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data)
SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_BINARY_DIR}/stel SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_BINARY_DIR}/
larium-rc.o) stellarium-rc.o)
ELSE() ELSE()
IF(MSVC) IF(MSVC)
SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_SOURCE_DIR}/da SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_SOURCE_D
ta/stellarium.rc) IR}/data/stellarium.rc)
ENDIF()
ENDIF() ENDIF()
ENDIF()
ENDIF() ENDIF()
IF(GENERATE_STELMAINLIB) IF(GENERATE_STELMAINLIB)
ADD_LIBRARY(stelMain SHARED ${stellarium_lib_SRCS} ${stellarium_RES_CXX}) ADD_LIBRARY(stelMain SHARED ${stellarium_lib_SRCS} ${stellarium_RES_CXX
TARGET_LINK_LIBRARIES(stelMain ${extLinkerOption} ${STELLARIUM_STATIC_PLUG })
INS_LIBRARIES}) TARGET_LINK_LIBRARIES(stelMain ${extLinkerOption} ${STELLARIUM_STATIC_P
QT5_USE_MODULES(stelMain Core Concurrent Declarative Gui Network OpenGL Sc LUGINS_LIBRARIES})
ript Widgets) QT5_USE_MODULES(stelMain Core Concurrent Declarative Gui Network OpenGL
IF(ENABLE_SOUND) Script Widgets)
QT5_USE_MODULES(stelMain Multimedia) IF(ENABLE_SOUND)
ENDIF() QT5_USE_MODULES(stelMain Multimedia)
INSTALL(TARGETS stelMain DESTINATION lib) ENDIF()
ADD_EXECUTABLE(stellarium ${stellarium_exe_SRCS}) INSTALL(TARGETS stelMain DESTINATION lib)
#stelMain should be after the plug-ins, otherwise the build crashes ADD_EXECUTABLE(stellarium ${stellarium_exe_SRCS})
TARGET_LINK_LIBRARIES(stellarium ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} st #stelMain should be after the plug-ins, otherwise the build crashes
elMain ${extLinkerOption}) TARGET_LINK_LIBRARIES(stellarium ${STELLARIUM_STATIC_PLUGINS_LIBRARIES}
stelMain ${extLinkerOption})
ELSE() ELSE()
ADD_EXECUTABLE(stellarium ${stellarium_lib_SRCS} ${stellarium_RES_CXX} ${s ADD_EXECUTABLE(stellarium ${stellarium_lib_SRCS} ${stellarium_RES_CXX}
tellarium_exe_SRCS}) ${stellarium_exe_SRCS})
TARGET_LINK_LIBRARIES(stellarium ${extLinkerOption} ${STELLARIUM_STATIC_PL TARGET_LINK_LIBRARIES(stellarium ${extLinkerOption} ${STELLARIUM_STATIC
UGINS_LIBRARIES}) _PLUGINS_LIBRARIES})
# This will add the ANGLE lib if the Qt version supports it. # This will add the ANGLE lib if the Qt version supports it.
TARGET_LINK_LIBRARIES(stellarium ${Qt5Gui_LIBRARIES} ${Qt5Gui_OPENGL_LIBRA TARGET_LINK_LIBRARIES(stellarium ${Qt5Gui_LIBRARIES} ${Qt5Gui_OPENGL_LI
RIES}) BRARIES})
QT5_USE_MODULES(stellarium Core Concurrent Declarative Gui Network OpenGL QT5_USE_MODULES(stellarium Core Concurrent Declarative Gui Network Open
Script Widgets) GL Script Widgets)
IF(ENABLE_SOUND) IF(ENABLE_SOUND)
QT5_USE_MODULES(stellarium Multimedia) QT5_USE_MODULES(stellarium Multimedia)
ENDIF() ENDIF()
IF(APPLE)
SET_TARGET_PROPERTIES(stellarium PROPERTIES LINK_FLAGS " -framework Cocoa
-framework OpenGL")
ENDIF()
IF(APPLE)
SET_TARGET_PROPERTIES(stellarium PROPERTIES LINK_FLAGS " -framework
Cocoa -framework OpenGL")
ENDIF()
ENDIF() ENDIF()
ADD_DEPENDENCIES(stellarium AllStaticPlugins) ADD_DEPENDENCIES(stellarium AllStaticPlugins)
INSTALL(TARGETS stellarium DESTINATION bin) INSTALL(TARGETS stellarium DESTINATION bin)
########################################################################### ################## ########################################################################### ##################
################################## Build unit tests ####################### ################## ################################## Build unit tests ####################### ##################
########################################################################### ################## ########################################################################### ##################
skipping to change at line 630 skipping to change at line 593
IF(WIN32) IF(WIN32)
# StelUtils required zlib sources # StelUtils required zlib sources
SET(tests_testConversions_SRCS ${tests_testConversions_SRCS} ${zlib_ SRCS}) SET(tests_testConversions_SRCS ${tests_testConversions_SRCS} ${zlib_ SRCS})
ENDIF() ENDIF()
ADD_EXECUTABLE(testConversions EXCLUDE_FROM_ALL ${tests_testConversions_SRC S}) ADD_EXECUTABLE(testConversions EXCLUDE_FROM_ALL ${tests_testConversions_SRC S})
QT5_USE_MODULES(testConversions Core Gui Widgets Script Declarative Test) QT5_USE_MODULES(testConversions Core Gui Widgets Script Declarative Test)
TARGET_LINK_LIBRARIES(testConversions ${extLinkerOptionTest}) TARGET_LINK_LIBRARIES(testConversions ${extLinkerOptionTest})
ADD_DEPENDENCIES(buildTests testConversions) ADD_DEPENDENCIES(buildTests testConversions)
ADD_TEST(testConversions) ADD_TEST(testConversions)
SET(tests_testExtinction_SRCS
tests/testExtinction.hpp
tests/testExtinction.cpp
core/RefractionExtinction.hpp
core/RefractionExtinction.cpp)
ADD_EXECUTABLE(testExtinction EXCLUDE_FROM_ALL ${tests_testExtinction_SRCS}
)
QT5_USE_MODULES(testExtinction Core Gui Widgets Script Declarative Test)
TARGET_LINK_LIBRARIES(testExtinction ${extLinkerOptionTest})
ADD_DEPENDENCIES(buildTests testExtinction)
ADD_TEST(testExtinction)
SET(tests_testRefraction_SRCS
tests/testRefraction.hpp
tests/testRefraction.cpp
core/RefractionExtinction.hpp
core/RefractionExtinction.cpp
core/StelUtils.hpp
core/StelUtils.cpp)
IF(WIN32)
# StelUtils required zlib sources
SET(tests_testRefraction_SRCS ${tests_testRefraction_SRCS} ${zlib_S
RCS})
ENDIF()
ADD_EXECUTABLE(testRefraction EXCLUDE_FROM_ALL ${tests_testRefraction_SRCS}
)
QT5_USE_MODULES(testRefraction Core Gui Widgets Script Declarative Test)
TARGET_LINK_LIBRARIES(testRefraction ${extLinkerOptionTest})
ADD_DEPENDENCIES(buildTests testRefraction)
ADD_TEST(testRefraction)
ADD_CUSTOM_TARGET(tests COMMENT "Run the Stellarium unit tests") ADD_CUSTOM_TARGET(tests COMMENT "Run the Stellarium unit tests")
FOREACH(NAME ${STELLARIUM_TESTS}) FOREACH(NAME ${STELLARIUM_TESTS})
IF(MSVC) IF(MSVC)
ADD_CUSTOM_COMMAND(TARGET tests POST_BUILD COMMAND ./${CMAKE _BUILD_TYPE}/${NAME}.exe WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src) ADD_CUSTOM_COMMAND(TARGET tests POST_BUILD COMMAND ./${CMAKE _BUILD_TYPE}/${NAME}.exe WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src)
ELSE() ELSE()
ADD_CUSTOM_COMMAND(TARGET tests POST_BUILD COMMAND ./${NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src) ADD_CUSTOM_COMMAND(TARGET tests POST_BUILD COMMAND ./${NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src)
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
ADD_DEPENDENCIES(tests buildTests) ADD_DEPENDENCIES(tests buildTests)
 End of changes. 12 change blocks. 
102 lines changed or deleted 81 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/