CMakeLists.txt   CMakeLists.txt 
skipping to change at line 21 skipping to change at line 21
IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO N}" LESS 3.0.2)) IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO N}" LESS 3.0.2))
CMAKE_POLICY(SET CMP0043 OLD) CMAKE_POLICY(SET CMP0043 OLD)
ENDIF() ENDIF()
IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO N}" LESS 3.1.3)) IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO N}" LESS 3.1.3))
CMAKE_POLICY(SET CMP0054 OLD) CMAKE_POLICY(SET CMP0054 OLD)
ENDIF() ENDIF()
########### Project name ########### ########### Project name ###########
PROJECT(Stellarium) PROJECT(Stellarium)
SET(STELLARIUM_MAJOR "0") # Use integer versions instead of strings for easier handling if required
SET(STELLARIUM_MINOR "14") SET(STELLARIUM_MAJOR 0)
SET(STELLARIUM_PATCH "3") SET(STELLARIUM_MINOR 15)
SET(STELLARIUM_PATCH 0)
ADD_DEFINITIONS(
-DSTELLARIUM_MAJOR=${STELLARIUM_MAJOR}
-DSTELLARIUM_MINOR=${STELLARIUM_MINOR}
-DSTELLARIUM_PATCH=${STELLARIUM_PATCH}
)
SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}") SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}")
SET(PACKAGE stellarium) SET(PACKAGE stellarium)
SET(COPYRIGHT_YEARS "2000-2016") SET(COPYRIGHT_YEARS "2000-2016")
SET(PACKAGE_VERSION "${VERSION}") SET(PACKAGE_VERSION "${VERSION}")
ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}") ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}")
ADD_DEFINITIONS(-DCOPYRIGHT_YEARS="${COPYRIGHT_YEARS}") ADD_DEFINITIONS(-DCOPYRIGHT_YEARS="${COPYRIGHT_YEARS}")
SET(MINIMAL_QT_VERSION "5.3.0") SET(MINIMAL_QT_VERSION "5.3.0")
# Use customized cmake macros # Use customized cmake macros
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
########### Main global variables ########### ########### Main global variables ###########
IF(NOT CMAKE_BUILD_TYPE) IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, op tions are: None Debug GProf Valgrind Release RelWithDebInfo MinSizeRel." FO RCE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, op tions are: None Debug GProf Valgrind Release RelWithDebInfo MinSizeRel." FO RCE)
ENDIF() ENDIF()
SET(STELLARIUM_RELEASE_BUILD 1 CACHE BOOL "Set 1 to build as an official re
lease (0 for development snapshots).")
IF(STELLARIUM_RELEASE_BUILD)
ADD_DEFINITIONS(-DSTELLARIUM_RELEASE_BUILD)
ENDIF()
# GZ I had seen that some releases (e.g. 0.13.3 Ubuntu/ARM) were not compil
ed with NDEBUG defined. Maybe a bug in compilatation setup?
# Hint from http://public.kitware.com/Bug/view.php?id=14292. Actually fixed
with CMake 2.8.12, but maybe we have other effects?
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
ADD_DEFINITIONS(-DQT_NO_DEBUG -DNDEBUG)
endif()
# Use ccache if possible
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
MESSAGE(STATUS "Found ccache ${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
# Add gprof build options if necessary. Note gmon.out will be created in w orking directory when Stellarium is executed # Add gprof build options if necessary. Note gmon.out will be created in w orking directory when Stellarium is executed
IF(${CMAKE_BUILD_TYPE} MATCHES "GProf") IF(${CMAKE_BUILD_TYPE} MATCHES "GProf")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
ENDIF() ENDIF()
# Add valgrind build options if necessary # Add valgrind build options if necessary
IF(${CMAKE_BUILD_TYPE} MATCHES "Valgrind") IF(${CMAKE_BUILD_TYPE} MATCHES "Valgrind")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g")
ENDIF() ENDIF()
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(APPLE 1) SET(APPLE 1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
ENDIF() ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
IF(WIN32) IF(WIN32)
# The stars structs rely on gnu gcc packing of bit-fields. # The stars structs rely on gnu gcc packing of bit-fields.
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-ms-bitfields") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-ms-bitfields")
ENDIF() ENDIF()
SET(GCC_VERSION "${CMAKE_CXX_COMPILER_VERSION}") SET(GCC_VERSION "${CMAKE_CXX_COMPILER_VERSION}")
ELSE() ELSE()
SET(GCC_VERSION "0.0") SET(GCC_VERSION "0.0")
ENDIF() ENDIF()
# _USE_MATH_DEFINES enables use of math constants like M_PI,
# which are by default disabled in standard C++ mode (like std=c++11 instea
d of std=gnu11)
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
# flags shared for gcc-like compilers (also MinGW/Clang)
# Qt 5.7 requires C++11 support
SET(STEL_GCC_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-resul
t")
SET(STEL_GCC_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-res
ult")
SET(STELLARIUM_USE_CPP11 1 CACHE BOOL "Set whether to try using C++11 when
compiling. Required for Qt >= 5.7")
IF(STELLARIUM_USE_CPP11)
IF(NOT (CMAKE_VERSION VERSION_LESS 3.1.0))
# Let CMake handle setting C++11 (since 3.1)
SET(CMAKE_CXX_STANDARD 11)
ELSE()
# Add std=c++11 to gcc flags
SET(STEL_GCC_CXX_FLAGS "-std=c++11 ${STEL_GCC_CXX_FLAGS}")
ENDIF()
ENDIF()
IF(WIN32) IF(WIN32)
IF(NOT MSVC) IF(NOT MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexceptions -fident -m # MinGW requires enabling of exceptions, version number storage a
threads -Wno-unused-parameter -Wno-unused-result") nd MinGW-specific threading
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fiden SET(STEL_MINGW_FLAGS "-fexceptions -fident -mthreads")
t -mthreads -Wno-unused-parameter -Wno-unused-result") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${STEL_GCC_C_FLAGS} ${STEL_MI
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fexception NGW_FLAGS}")
s -fident -mthreads -mwindows") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STEL_GCC_CXX_FLAGS} ${S
ELSE() TEL_MINGW_FLAGS}")
# _USE_MATH_DEFINES Prevent MSVC from complaining about M_PI no m # -mwindows generates a windows GUI app
atter where <cmath> is included first SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STEL_MING
W_FLAGS} -mwindows")
ELSE() # MSVC
# NOMINMAX So that windows.h does not redefine min and max # NOMINMAX So that windows.h does not redefine min and max
# _WINSOCKAPI_ Prevent window.s from including winsock.h # _WINSOCKAPI_ Prevent window.s from including winsock.h
ADD_DEFINITIONS(-D_USE_MATH_DEFINES -DNOMINMAX -D_WINSOCKAPI_ /D_ CRT_SECURE_NO_WARNINGS /wd4244 /wd4005 /wd4101 /wd4996 /wd4305 /wd4805) ADD_DEFINITIONS(-DNOMINMAX -D_WINSOCKAPI_ /D_CRT_SECURE_NO_WARNIN GS /wd4244 /wd4005 /wd4101 /wd4996 /wd4305 /wd4805)
ENDIF() ENDIF()
ELSE() ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-paramete SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${STEL_GCC_C_FLAGS}")
r") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STEL_GCC_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-para
meter -Wno-unused-result")
ENDIF() ENDIF()
# CMake 3.0.0 the CMAKE_<LANG>_COMPILER_ID value for Apple-provided Clang i s now AppleClang # CMake 3.0.0 the CMAKE_<LANG>_COMPILER_ID value for Apple-provided Clang i s now AppleClang
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# using regular Clang or AppleClang # using regular Clang or AppleClang
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unus ed-private-field -Wno-uninitialized -Wno-tautological-constant-out-of-range -compare") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unus ed-private-field -Wno-uninitialized -Wno-tautological-constant-out-of-range -compare")
# The cosmetic fix for Clang 3.4 # The cosmetic fix for Clang 3.4
IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.3) IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.3)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variabl e -Wno-unused-result") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variabl e -Wno-unused-result")
ENDIF() ENDIF()
skipping to change at line 132 skipping to change at line 180
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -ffunction-sec tions -flto") #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -ffunction-sec tions -flto")
#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -f lto -ffunction-sections -fuse-linker-plugin") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -f lto -ffunction-sections -fuse-linker-plugin")
########### Others ########### ########### Others ###########
# Activate translation # Activate translation
SET(ENABLE_NLS 1 CACHE BOOL "Define whether program translation should be s upported.") SET(ENABLE_NLS 1 CACHE BOOL "Define whether program translation should be s upported.")
IF(ENABLE_NLS) IF(ENABLE_NLS)
ADD_DEFINITIONS(-DENABLE_NLS) ADD_DEFINITIONS(-DENABLE_NLS)
ENDIF() ENDIF()
SET(STELLARIUM_RELEASE_BUILD 1 CACHE BOOL "Flag this build as an official r # Activate media support
elease.") SET(ENABLE_MEDIA 1 CACHE BOOL "Define whether media support should be activ
IF(STELLARIUM_RELEASE_BUILD) ated.")
ADD_DEFINITIONS(-DSTELLARIUM_RELEASE_BUILD)
ENDIF()
# Activate sound support
SET(ENABLE_SOUND 0 CACHE BOOL "Define whether sound support should be activ
ated.")
SET(ENABLE_SCRIPTING 1 CACHE BOOL "Define whether scripting features should be activated.") SET(ENABLE_SCRIPTING 1 CACHE BOOL "Define whether scripting features should be activated.")
IF(ENABLE_SCRIPTING) IF(ENABLE_SCRIPTING)
# (De-)Activate the script edit console # (De-)Activate the script edit console
SET(ENABLE_SCRIPT_CONSOLE 1 CACHE BOOL "Define whether to build the sc ript console feature.") SET(ENABLE_SCRIPT_CONSOLE 1 CACHE BOOL "Define whether to build the sc ript console feature.")
IF(ENABLE_SCRIPT_CONSOLE) IF(ENABLE_SCRIPT_CONSOLE)
ADD_DEFINITIONS(-DENABLE_SCRIPT_CONSOLE) ADD_DEFINITIONS(-DENABLE_SCRIPT_CONSOLE)
ENDIF() ENDIF()
ELSE() ELSE()
ADD_DEFINITIONS(-DDISABLE_SCRIPTING) ADD_DEFINITIONS(-DDISABLE_SCRIPTING)
skipping to change at line 164 skipping to change at line 207
# On WIN32 we need to split the main binary into a small binary and a dll # On WIN32 we need to split the main binary into a small binary and a dll
# This is for allowing to link dynamic plug-ins afterward # This is for allowing to link dynamic plug-ins afterward
# It does not seem to work with MSVC, so I disable it for the moment. # It does not seem to work with MSVC, so I disable it for the moment.
IF(WIN32 AND NOT MSVC) IF(WIN32 AND NOT MSVC)
SET(GENERATE_STELMAINLIB 1) SET(GENERATE_STELMAINLIB 1)
ELSE() ELSE()
SET(GENERATE_STELMAINLIB 0) SET(GENERATE_STELMAINLIB 0)
ENDIF() ENDIF()
########### User Guide ###############
IF(EXISTS "${CMAKE_SOURCE_DIR}/guide/guide.pdf")
MESSAGE(STATUS "Found Stellarium User Guide")
INSTALL(FILES guide/guide.pdf DESTINATION share/${PACKAGE}/guide)
SET(ISS_GUIDE "Name: \"{group}\\{cm:UserGuide}\"; Filename: \"{app}\\g
uide\\guide.pdf\"")
ELSE()
SET(ISS_GUIDE "; No link to Stellarium User Guide")
ENDIF()
########### Plugin setup ############# ########### Plugin setup #############
SET(STELLARIUM_PLUGINS) # Global list of all the plugins. SET(STELLARIUM_PLUGINS) # Global list of all the plugins.
MACRO(ADD_PLUGIN NAME DEFAULT) MACRO(ADD_PLUGIN NAME DEFAULT)
STRING(TOUPPER ${NAME} NAME_UP) STRING(TOUPPER ${NAME} NAME_UP)
SET(USE_PLUGIN_${NAME_UP} ${DEFAULT} CACHE BOOL "Define wheter the ${N AME} plugin should be created.") SET(USE_PLUGIN_${NAME_UP} ${DEFAULT} CACHE BOOL "Define whether the ${ NAME} plugin should be created.")
SET(STELLARIUM_PLUGINS ${STELLARIUM_PLUGINS} ${NAME}) SET(STELLARIUM_PLUGINS ${STELLARIUM_PLUGINS} ${NAME})
ENDMACRO() ENDMACRO()
#### demo plugins #### #### demo plugins ####
ADD_PLUGIN(HelloStelModule 0) ADD_PLUGIN(HelloStelModule 0)
ADD_PLUGIN(SimpleDrawLine 0) ADD_PLUGIN(SimpleDrawLine 0)
#### work plugins #### #### work plugins ####
ADD_PLUGIN(AngleMeasure 1) ADD_PLUGIN(AngleMeasure 1)
ADD_PLUGIN(ArchaeoLines 1) ADD_PLUGIN(ArchaeoLines 1)
ADD_PLUGIN(CompassMarks 1) ADD_PLUGIN(CompassMarks 1)
skipping to change at line 192 skipping to change at line 244
ADD_PLUGIN(FOV 1) ADD_PLUGIN(FOV 1)
ADD_PLUGIN(LogBook 0) ADD_PLUGIN(LogBook 0)
ADD_PLUGIN(MeteorShowers 1) ADD_PLUGIN(MeteorShowers 1)
ADD_PLUGIN(NavStars 1) ADD_PLUGIN(NavStars 1)
ADD_PLUGIN(Novae 1) ADD_PLUGIN(Novae 1)
ADD_PLUGIN(Observability 1) ADD_PLUGIN(Observability 1)
ADD_PLUGIN(Oculars 1) ADD_PLUGIN(Oculars 1)
ADD_PLUGIN(PointerCoordinates 1) ADD_PLUGIN(PointerCoordinates 1)
ADD_PLUGIN(Pulsars 1) ADD_PLUGIN(Pulsars 1)
ADD_PLUGIN(Quasars 1) ADD_PLUGIN(Quasars 1)
# SOCIS 2015:
ADD_PLUGIN(RemoteControl 1)
ADD_PLUGIN(RemoteSync 0)
ADD_PLUGIN(Satellites 1) ADD_PLUGIN(Satellites 1)
ADD_PLUGIN(Scenery3d 1) ADD_PLUGIN(Scenery3d 1)
ADD_PLUGIN(SolarSystemEditor 1) ADD_PLUGIN(SolarSystemEditor 1)
ADD_PLUGIN(Supernovae 1) ADD_PLUGIN(Supernovae 1)
ADD_PLUGIN(TextUserInterface 1) ADD_PLUGIN(TextUserInterface 1)
ADD_PLUGIN(TelescopeControl 1) ADD_PLUGIN(TelescopeControl 1)
ADD_PLUGIN(TimeZoneConfiguration 1) ADD_PLUGIN(TimeZoneConfiguration 1)
########## Static plugins need to define includes and libraries ########## Static plugins need to define includes and libraries
########## for the compilation of Stellarium itself ########## for the compilation of Stellarium itself
skipping to change at line 224 skipping to change at line 279
IF(${Qt5Core_VERSION_STRING} VERSION_LESS MINIMAL_QT_VERSION) IF(${Qt5Core_VERSION_STRING} VERSION_LESS MINIMAL_QT_VERSION)
MESSAGE(FATAL_ERROR "Found Qt5: ${QMAKE_LOCATION} (found unsuitable ve rsion \"${Qt5Core_VERSION_STRING}\", required is \"${MINIMAL_QT_VERSION}\") ") MESSAGE(FATAL_ERROR "Found Qt5: ${QMAKE_LOCATION} (found unsuitable ve rsion \"${Qt5Core_VERSION_STRING}\", required is \"${MINIMAL_QT_VERSION}\") ")
ELSE() ELSE()
MESSAGE(STATUS "Found Qt5: ${QMAKE_LOCATION} (found suitable version \ "${Qt5Core_VERSION_STRING}\")") MESSAGE(STATUS "Found Qt5: ${QMAKE_LOCATION} (found suitable version \ "${Qt5Core_VERSION_STRING}\")")
ENDIF() ENDIF()
FIND_PACKAGE(Qt5Concurrent REQUIRED) FIND_PACKAGE(Qt5Concurrent REQUIRED)
FIND_PACKAGE(Qt5Gui REQUIRED) FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5Network REQUIRED) FIND_PACKAGE(Qt5Network REQUIRED)
FIND_PACKAGE(Qt5OpenGL REQUIRED) FIND_PACKAGE(Qt5OpenGL REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED) FIND_PACKAGE(Qt5Widgets REQUIRED)
FIND_PACKAGE(Qt5PrintSupport REQUIRED)
IF(USE_PLUGIN_TELESCOPECONTROL) IF(USE_PLUGIN_TELESCOPECONTROL)
FIND_PACKAGE(Qt5SerialPort REQUIRED) FIND_PACKAGE(Qt5SerialPort REQUIRED)
ENDIF() ENDIF()
IF(WIN32) IF(WIN32)
FIND_PACKAGE(Qt5Sql REQUIRED) FIND_PACKAGE(Qt5Sql REQUIRED)
FIND_PACKAGE(Qt5XmlPatterns REQUIRED) FIND_PACKAGE(Qt5XmlPatterns REQUIRED)
ENDIF() ENDIF()
# Tell CMake to run moc when necessary: # Tell CMake to run moc when necessary:
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake to always look f or includes there: # As moc files are generated in the binary dir, tell CMake to always look f or includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(ENABLE_SCRIPTING) IF(ENABLE_SCRIPTING)
SET(QT_USE_QTSCRIPT TRUE) SET(QT_USE_QTSCRIPT TRUE)
FIND_PACKAGE(Qt5Script REQUIRED) FIND_PACKAGE(Qt5Script REQUIRED)
INCLUDE_DIRECTORIES(${Qt5Script_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Qt5Script_INCLUDE_DIRS})
ENDIF() ENDIF()
IF(ENABLE_SOUND) IF(ENABLE_MEDIA)
ADD_DEFINITIONS(-DENABLE_SOUND) ADD_DEFINITIONS(-DENABLE_MEDIA)
FIND_PACKAGE(Qt5Multimedia REQUIRED) FIND_PACKAGE(Qt5Multimedia REQUIRED)
FIND_PACKAGE(Qt5MultimediaWidgets REQUIRED) FIND_PACKAGE(Qt5MultimediaWidgets REQUIRED)
INCLUDE_DIRECTORIES(${Qt5Multimedia_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Qt5Multimedia_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5MultimediaWidgets_INCLUDE_DIRS})
ENDIF() ENDIF()
# I add this test because on Windows with angle we should not link # I add this test because on Windows with angle we should not link
# with OpenGL. Maybe there is a better way to do that. # with OpenGL. Maybe there is a better way to do that.
IF("${Qt5Gui_OPENGL_LIBRARIES}" MATCHES "opengl") IF("${Qt5Gui_OPENGL_LIBRARIES}" MATCHES "opengl")
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
ENDIF() ENDIF()
IF(NOT WIN32) IF(NOT WIN32)
FIND_PACKAGE(ZLIB) FIND_PACKAGE(ZLIB)
ELSE() ELSE()
skipping to change at line 280 skipping to change at line 337
# Used in generating the documentation (doc/stellarium.pod.cmake): # Used in generating the documentation (doc/stellarium.pod.cmake):
SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/share/stellarium") SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/share/stellarium")
ENDIF() ENDIF()
ELSE() ELSE()
ADD_DEFINITIONS(-DINSTALL_DATADIR=".") ADD_DEFINITIONS(-DINSTALL_DATADIR=".")
ADD_DEFINITIONS(-DINSTALL_LOCALEDIR="./locale") ADD_DEFINITIONS(-DINSTALL_LOCALEDIR="./locale")
ENDIF() ENDIF()
########### Get revision number for non-release builds ########### ########### Get revision number for non-release builds ###########
IF(NOT STELLARIUM_RELEASE_BUILD) IF(NOT STELLARIUM_RELEASE_BUILD)
#Hack until CMake detection for Bazaar is finished # Hack until CMake detection for Bazaar is finished
EXECUTE_PROCESS(COMMAND bzr revno WORKING_DIRECTORY ${CMAKE_CURRENT_SOU
RCE_DIR} TIMEOUT 30 OUTPUT_VARIABLE BZR_REVISION OUTPUT_STRIP_TRAILING_WHIT
ESPACE ERROR_VARIABLE BZR_ERROR)
EXECUTE_PROCESS(COMMAND bzr version-info --custom --template={branch_ni
ck} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} TIMEOUT 30 OUTPUT_VARIABL
E BZR_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE BZR_ERROR)
IF(BZR_REVISION) IF(BZR_REVISION)
SET(PACKAGE_VERSION "bzr${BZR_REVISION}") SET(PACKAGE_VERSION "${VERSION}.${BZR_REVISION}")
ADD_DEFINITIONS(-DBZR_REVISION="${BZR_REVISION}") ADD_DEFINITIONS(-DBZR_REVISION="${BZR_REVISION}")
ADD_DEFINITIONS(-DBZR_BRANCH="${BZR_BRANCH}")
ENDIF() ENDIF()
# MESSAGE(STATUS "Branch: ${BZR_BRANCH}; Revision: ${BZR_REVISION}; Err or: ${BZR_ERROR}")
IF(STELLARIUM_VERSION) IF(STELLARIUM_VERSION)
SET(PACKAGE_VERSION "${STELLARIUM_VERSION}") SET(PACKAGE_VERSION "${STELLARIUM_VERSION}")
ADD_DEFINITIONS(-DSTELLARIUM_VERSION="${STELLARIUM_VERSION}") ADD_DEFINITIONS(-DSTELLARIUM_VERSION="${STELLARIUM_VERSION}")
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(WIN32) IF(WIN32)
####################################################### #######################################################
### Generate icon file name ###
#######################################################
IF(STELLARIUM_RELEASE_BUILD)
SET(PACKAGE_ICON "stellarium")
ELSE()
SET(PACKAGE_ICON "stellarium-gray")
ENDIF()
#######################################################
### Generate a VersionInfo file ### ### Generate a VersionInfo file ###
####################################################### #######################################################
IF(STELLARIUM_RELEASE_BUILD) IF(STELLARIUM_RELEASE_BUILD)
SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION},0") SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION},0")
ELSE() ELSE()
SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION}") SET(PACKAGE_VERSION_RC "${PACKAGE_VERSION}")
ENDIF() ENDIF()
STRING(REGEX REPLACE "([.]+)" "," PACKAGE_VERSION_RC ${PACKAGE_VERSION_ RC}) STRING(REGEX REPLACE "([.]+)" "," PACKAGE_VERSION_RC ${PACKAGE_VERSION_ RC})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/stellarium.rc.cmake ${CMAKE_SOU RCE_DIR}/data/stellarium.rc @ONLY) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/stellarium.rc.cmake ${CMAKE_CU RRENT_BINARY_DIR}/stellarium.rc @ONLY)
####################################################### #######################################################
### [Optional] Embed icon in the Windows executable ### ### [Optional] Embed icon in the Windows executable ###
####################################################### #######################################################
SET(ENABLE_WINDOWS_EXE_ICON 1 CACHE BOOL "Determine if it should try to embed the Stellarium icon in the Windows .exe file") SET(ENABLE_WINDOWS_EXE_ICON 1 CACHE BOOL "Determine if it should try to embed the Stellarium icon in the Windows .exe file")
IF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH) IF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH)
IF(NOT MSVC) IF(NOT MSVC)
#The mingGW snapshot distributed with the Qt SDK has it under t his name. #The mingGW snapshot distributed with the Qt SDK has it under t his name.
SET(RC_COMPILER_FILENAME "windres.exe") SET(RC_COMPILER_FILENAME "windres.exe")
skipping to change at line 329 skipping to change at line 400
####################################################### #######################################################
### Generate an Inno Setup project file ### ### Generate an Inno Setup project file ###
####################################################### #######################################################
# Try to guess the MinGW /bin directory... # Try to guess the MinGW /bin directory...
GET_FILENAME_COMPONENT(MINGW_BIN_DIRECTORY ${CMAKE_CXX_COMPILER} PATH) GET_FILENAME_COMPONENT(MINGW_BIN_DIRECTORY ${CMAKE_CXX_COMPILER} PATH)
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
SET(ISS_ARCHITECTURE_SPECIFIC ";In the 64-bit only version, this li ne switches the installer to 64-bit mode.") SET(ISS_ARCHITECTURE_SPECIFIC ";In the 64-bit only version, this li ne switches the installer to 64-bit mode.")
SET(ISS_PACKAGE_PLATFORM "win32") SET(ISS_PACKAGE_PLATFORM "win32")
# TODO: Add selector for VC2013/VC2015
SET(REDIST_VERSION "VC_REDIST_X86") SET(REDIST_VERSION "VC_REDIST_X86")
IF(MSVC) IF(MSVC)
SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v credist_x86.exe\"; DestDir: \"{tmp}\";") SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v credist_x86.exe\"; DestDir: \"{tmp}\";")
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x86.exe\"; Parameter s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \" {cm:RedistRun}\"; Check: VCRedistNeedsInstall") SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x86.exe\"; Parameter s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \" {cm:RedistRun}\"; Check: VCRedistNeedsInstall")
ELSE() ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_dw2-1. dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread* .dll\"; DestDir: \"{app}\";") SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_dw2-1. dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread* .dll\"; DestDir: \"{app}\";")
SET(REDIST_RUN "; Redistributable package not required for MinG W") SET(REDIST_RUN "; Redistributable package not required for MinG W")
ENDIF() ENDIF()
ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET(ISS_ARCHITECTURE_SPECIFIC ";Make the installer run only on win6 4:\nArchitecturesAllowed=x64\n;Switch to 64-bit install mode:\nArchitecture sInstallIn64BitMode=x64") SET(ISS_ARCHITECTURE_SPECIFIC ";Make the installer run only on win6 4:\nArchitecturesAllowed=x64\n;Switch to 64-bit install mode:\nArchitecture sInstallIn64BitMode=x64")
SET(ISS_PACKAGE_PLATFORM "win64") SET(ISS_PACKAGE_PLATFORM "win64")
# TODO: Add selector for VC2013/VC2015
SET(REDIST_VERSION "VC_REDIST_X64") SET(REDIST_VERSION "VC_REDIST_X64")
IF(MSVC) IF(MSVC)
SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v credist_x64.exe\"; DestDir: \"{tmp}\";") SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v credist_x64.exe\"; DestDir: \"{tmp}\";")
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x64.exe\"; Parameter s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \" {cm:RedistRun}\"; Check: VCRedistNeedsInstall") SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x64.exe\"; Parameter s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \" {cm:RedistRun}\"; Check: VCRedistNeedsInstall")
ELSE() ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*. dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_sjlj* .dll\"; DestDir: \"{app}\";") SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*. dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_sjlj* .dll\"; DestDir: \"{app}\";")
SET(REDIST_RUN "; Redistributable package not required for MinG W") SET(REDIST_RUN "; Redistributable package not required for MinG W")
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(ISS_AUTOGENERATED_WARNING "Do not edit this file! It has been autom atically generated by CMake. Your changes will be lost the next time CMake is run.") SET(ISS_AUTOGENERATED_WARNING "Do not edit this file! It has been autom atically generated by CMake. Your changes will be lost the next time CMake is run.")
skipping to change at line 366 skipping to change at line 439
SET(MESALIB "Source: \"${CMAKE_SOURCE_DIR}/util/MESA/opengl32sw.dll \"; DestDir: \"{app}\";") SET(MESALIB "Source: \"${CMAKE_SOURCE_DIR}/util/MESA/opengl32sw.dll \"; DestDir: \"{app}\";")
ENDIF() ENDIF()
GET_TARGET_PROPERTY(QtConcurrent_location Qt5::Concurrent LOCATION) GET_TARGET_PROPERTY(QtConcurrent_location Qt5::Concurrent LOCATION)
GET_TARGET_PROPERTY(QtCore_location Qt5::Core LOCATION) GET_TARGET_PROPERTY(QtCore_location Qt5::Core LOCATION)
GET_TARGET_PROPERTY(QtGui_location Qt5::Gui LOCATION) GET_TARGET_PROPERTY(QtGui_location Qt5::Gui LOCATION)
GET_TARGET_PROPERTY(QtOpenGL_location Qt5::OpenGL LOCATION) GET_TARGET_PROPERTY(QtOpenGL_location Qt5::OpenGL LOCATION)
GET_TARGET_PROPERTY(QtNetwork_location Qt5::Network LOCATION) GET_TARGET_PROPERTY(QtNetwork_location Qt5::Network LOCATION)
GET_TARGET_PROPERTY(QtWidgets_location Qt5::Widgets LOCATION) GET_TARGET_PROPERTY(QtWidgets_location Qt5::Widgets LOCATION)
GET_TARGET_PROPERTY(QtSql_location Qt5::Sql LOCATION) GET_TARGET_PROPERTY(QtSql_location Qt5::Sql LOCATION)
GET_TARGET_PROPERTY(QtXmlPatterns_location Qt5::XmlPatterns LOCATION) GET_TARGET_PROPERTY(QtXmlPatterns_location Qt5::XmlPatterns LOCATION)
GET_TARGET_PROPERTY(QtPrintSupport_location Qt5::PrintSupport LOCATION)
IF(ENABLE_SCRIPTING) IF(ENABLE_SCRIPTING)
GET_TARGET_PROPERTY(QtScript_location Qt5::Script LOCATION) GET_TARGET_PROPERTY(QtScript_location Qt5::Script LOCATION)
SET(ISS_QT_SCRIPT "Source: \"${QtScript_location}\"; DestDir: \"{ap p}\";") SET(ISS_QT_SCRIPT "Source: \"${QtScript_location}\"; DestDir: \"{ap p}\";")
ELSE() ELSE()
SET(ISS_QT_SCRIPT "; QtScript isn't used") SET(ISS_QT_SCRIPT "; QtScript isn't used")
ENDIF() ENDIF()
IF(USE_PLUGIN_TELESCOPECONTROL) IF(USE_PLUGIN_TELESCOPECONTROL)
GET_TARGET_PROPERTY(QtSerialPort_location Qt5::SerialPort LOCATION) GET_TARGET_PROPERTY(QtSerialPort_location Qt5::SerialPort LOCATION)
SET(ISS_QT_SERIALPORT "Source: \"${QtSerialPort_location}\"; DestDi r: \"{app}\";") SET(ISS_QT_SERIALPORT "Source: \"${QtSerialPort_location}\"; DestDi r: \"{app}\";")
ELSE() ELSE()
SET(ISS_QT_SERIALPORT "; QtSerialPort isn't used") SET(ISS_QT_SERIALPORT "; QtSerialPort isn't used")
ENDIF() ENDIF()
IF(ENABLE_SOUND) IF(ENABLE_MEDIA)
GET_TARGET_PROPERTY(QtMultimedia_location Qt5::Multimedia LOCATION) GET_TARGET_PROPERTY(QtMultimedia_location Qt5::Multimedia LOCATION)
GET_TARGET_PROPERTY(QtMultimediaWidgets_location Qt5::MultimediaWid gets LOCATION) GET_TARGET_PROPERTY(QtMultimediaWidgets_location Qt5::MultimediaWid gets LOCATION)
SET(ISS_QT_MULTIMEDIA "Source: \"${QtMultimedia_location}\"; DestDi r: \"{app}\";\nSource: \"${QtMultimediaWidgets_location}\"; DestDir: \"{app }\";") SET(ISS_QT_MULTIMEDIA "Source: \"${QtMultimedia_location}\"; DestDi r: \"{app}\";\nSource: \"${QtMultimediaWidgets_location}\"; DestDir: \"{app }\";")
ELSE() ELSE()
SET(ISS_QT_MULTIMEDIA "; QtMultimedia isn't used") SET(ISS_QT_MULTIMEDIA "; QtMultimedia isn't used")
ENDIF() ENDIF()
GET_FILENAME_COMPONENT(QT5_LIBS ${QtCore_location} PATH) GET_FILENAME_COMPONENT(QT5_LIBS ${QtCore_location} PATH)
IF(MSVC) IF(MSVC)
# Use installer for checking minimum requirements # Use installer for checking minimum requirements
# Stellarium/MSVC require Windows Vista (6.0) for work # Stellarium/MSVC require Windows Vista (6.0) for work
skipping to change at line 405 skipping to change at line 479
# Details: http://www.jrsoftware.org/ishelp/index.php?topic=winvern otes # Details: http://www.jrsoftware.org/ishelp/index.php?topic=winvern otes
SET(MIN_VERSION "5.1") SET(MIN_VERSION "5.1")
SET(ISS_ANGLE_LIBS "; ANGLE support doesn't exists for MinGW") SET(ISS_ANGLE_LIBS "; ANGLE support doesn't exists for MinGW")
ENDIF() ENDIF()
SET(ISS_ICU_LIBS "; ICU support\nSource: \"${QT5_LIBS}/icu*.dll\"; Dest Dir: \"{app}\";") SET(ISS_ICU_LIBS "; ICU support\nSource: \"${QT5_LIBS}/icu*.dll\"; Dest Dir: \"{app}\";")
# Deploy related stuff # Deploy related stuff
SET(ISS_QT_PLUGINS "; Qt plugins") SET(ISS_QT_PLUGINS "; Qt plugins")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /platforms/qwindows.dll\"; DestDir: \"{app}/platforms/\";") SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /platforms/qwindows.dll\"; DestDir: \"{app}/platforms/\";")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /imageformats/qico.dll\"; DestDir: \"{app}/imageformats/\";") SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /imageformats/qico.dll\"; DestDir: \"{app}/imageformats/\";")
SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /imageformats/qjpeg.dll\"; DestDir: \"{app}/imageformats/\";") SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plugins /imageformats/qjpeg.dll\"; DestDir: \"{app}/imageformats/\";")
IF(ENABLE_SOUND) IF(ENABLE_MEDIA)
SET(ISS_MULTIMEDIA_PLUGINS "Source: \"${QT5_LIBS}/../plugins/medias SET(ISS_QT_PLUGINS "${ISS_QT_PLUGINS}\nSource: \"${QT5_LIBS}/../plug
ervice/dsengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource: \"${QT5_L ins/mediaservice/dsengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource:
IBS}/../plugins/mediaservice/qtmedia_audioengine.dll\"; DestDir: \"{app}/me \"${QT5_LIBS}/../plugins/mediaservice/qtmedia_audioengine.dll\"; DestDir:
diaservice/\";\nSource: \"${QT5_LIBS}/../plugins/playlistformats/qtmultimed \"{app}/mediaservice/\";\nSource: \"${QT5_LIBS}/../plugins/playlistformats/
ia_m3u.dll\"; DestDir: \"{app}/playlistformats/\";") qtmultimedia_m3u.dll\"; DestDir: \"{app}/playlistformats/\";")
ELSE()
SET(ISS_MULTIMEDIA_PLUGINS "; QtMultimedia isn't used")
ENDIF() ENDIF()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium.iss.cmake ${CMAKE_SOURCE_
DIR}/stellarium.iss @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium-patch.iss.cmake ${CMAKE_S
OURCE_DIR}/stellarium-patch.iss @ONLY)
ENDIF()
IF(APPLE)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/Info.plist.cmake ${CMAKE_SOURCE
_DIR}/data/Info.plist @ONLY)
ENDIF() ENDIF()
IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWit hDebInfo") IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWit hDebInfo")
ADD_DEFINITIONS(-DQT_NO_DEBUG) ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DNDEBUG) ADD_DEFINITIONS(-DNDEBUG)
ENDIF() ENDIF()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/default_config.ini.cmake ${CMAKE_SO URCE_DIR}/data/default_config.ini @ONLY) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/default_config.ini.cmake ${CMAKE_S OURCE_DIR}/data/default_config.ini @ONLY)
########### uninstall files ############### ########### uninstall files ###############
CONFIGURE_FILE( CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY) IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmak e") "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmak e")
########### Packaging info for CPack ########### ########### Packaging info for CPack ###########
IF(GENERATE_PACKAGE_TARGET) IF(GENERATE_PACKAGE_TARGET)
INCLUDE(InstallRequiredSystemLibraries) INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Stellarium is a free open source planetarium for your computer. It shows a realistic sky in 3D, just like w hat you see with the naked eye, binoculars or a telescope.") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Stellarium is a free open source planetarium for your computer. It shows a realistic sky in 3D, just like w hat you see with the naked eye, binoculars or a telescope.")
SET(CPACK_PACKAGE_VENDOR "Stellarium's team") SET(CPACK_PACKAGE_VENDOR "Stellarium's team")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README" ) SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README" )
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_VERSION_MAJOR ${STELLARIUM_MAJOR}) SET(CPACK_PACKAGE_VERSION_MAJOR "${STELLARIUM_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR ${STELLARIUM_MINOR}) SET(CPACK_PACKAGE_VERSION_MINOR "${STELLARIUM_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH ${STELLARIUM_PATCH}) SET(CPACK_PACKAGE_VERSION_PATCH "${STELLARIUM_PATCH}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "stellarium") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "stellarium")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "stellarium-${VERSION}") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "stellarium-${VERSION}")
SET(CPACK_SOURCE_GENERATOR "TGZ") SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_GENERATOR "TGZ") SET(CPACK_GENERATOR "TGZ")
SET(CPACK_STRIP_FILES "bin/stellarium") SET(CPACK_STRIP_FILES "bin/stellarium")
SET(CPACK_PACKAGE_EXECUTABLES "stellarium" "Stellarium") SET(CPACK_PACKAGE_EXECUTABLES "stellarium" "Stellarium")
SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/.svn/" "/.git/" "/.bzr/" "build s/" "installers/" "Stellarium.tag$" "Stellarium.kdevelop.pcs$" "/CMakeLists .txt.user$" "\\\\.bzrignore$" "~$" "\\\\.swp$" "\\\\.#" "/#") SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/.svn/" "/.git/" "/.bzr/" "guide /" "builds/" "installers/" "Stellarium.tag$" "Stellarium.kdevelop.pcs$" "/C MakeLists.txt.user$" "\\\\.bzrignore$" "\\\\.yml$" "~$" "\\\\.swp$" "\\\\.# " "/#")
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+") SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+")
SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics") SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
SET(CPACK_RPM_PACKAGE_URL "http://stellarium.org/") SET(CPACK_RPM_PACKAGE_URL "http://stellarium.org/")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <stellariu m-pubdevel@lists.sourceforge.net>") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <stellariu m-pubdevel@lists.sourceforge.net>")
SET(CPACK_DEBIAN_PACKAGE_SECTION "science") SET(CPACK_DEBIAN_PACKAGE_SECTION "science")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION}+deb1") SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION}+deb1")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}") SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
INCLUDE(CPack) INCLUDE(CPack)
ENDIF() ENDIF()
########### Macosx Bundling ############### ########### OS X Bundling ###############
IF(APPLE) IF(APPLE)
# ${Qt5Core_INCLUDE_DIRS} is a list; I'm expecting the first entry to CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Info.plist.cmake ${CMAKE_SOURC
always be QtCore.framework. E_DIR}/data/Info.plist @ONLY)
ADD_CUSTOM_TARGET(
mac_app # ${Qt5Core_INCLUDE_DIRS} is a list; I'm expecting the first entry to a
python util/mac_app.py ${CMAKE_INSTALL_PREFIX} ${PROJECT_SOURCE_D lways be QtCore.framework.
IR} ${CMAKE_BUILD_TYPE} ${Qt5Core_INCLUDE_DIRS} ADD_CUSTOM_TARGET(
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Stellarium.app mac_app
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} python util/mac_app.py ${CMAKE_INSTALL_PREFIX} ${PROJECT_SOURCE_DIR
COMMENT "making the macosx bundle." } ${CMAKE_BUILD_TYPE} ${Qt5Core_INCLUDE_DIRS}
VERBATIM DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Stellarium.app
) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "making the macosx bundle."
VERBATIM
)
ENDIF()
########### Windows packaging ###############
IF(WIN32)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/stellarium.iss.cmake ${CMAKE
_CURRENT_BINARY_DIR}/stellarium.iss @ONLY)
SET(ISS_COMPILER_FILENAME "ISCC.exe")
FIND_FILE(ISS_COMPILER_PATH ${ISS_COMPILER_FILENAME})
IF(ISS_COMPILER_PATH)
MESSAGE(STATUS "Found Inno Setup (.iss) compiler: ${ISS_COMPILER_PA
TH}")
# Add installer target
ADD_CUSTOM_TARGET(
stellarium-installer
COMMAND ${ISS_COMPILER_PATH} "${CMAKE_CURRENT_BINARY_DIR}/st
ellarium.iss"
COMMENT "Making an installer package for Windows..."
VERBATIM
)
ELSE()
MESSAGE(WARNING "Inno Setup Compiler not found. You won't be able t
o build setup files.")
ENDIF()
ENDIF() ENDIF()
########### Generate doxygen doc ############### ########### Generate doxygen doc ###############
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_ FIND_PACKAGE(Doxygen)
DIR}/Doxyfile @ONLY) IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(apidoc doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKI IF(DOXYGEN_DOT_FOUND)
NG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate the doxygen docu SET(HAVE_DOT "YES")
mentation into the doc directory.") SET(DOT_PATH ${DOXYGEN_DOT_PATH})
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile-plugins.cmake ${CMAKE_CURRENT ELSE()
_BINARY_DIR}/Doxyfile-plugins @ONLY) SET(HAVE_DOT "NO")
ADD_CUSTOM_TARGET(apidoc-plugins doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfi SET(DOT_PATH "")
le-plugins WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate ENDIF()
the doxygen documentation into the doc-plugins directory.") CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/Doxyfile.cmake ${CMAKE_CURRE
NT_BINARY_DIR}/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(apidoc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_D
IR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generat
e the doxygen documentation into the doc directory.")
ENDIF()
##################### Generate translation copying script ################# ##### ##################### Generate translation copying script ################# #####
IF(WIN32) IF(WIN32)
STRING(REPLACE "/" "\\" PROJECT_SOURCE_DIR_WINPATH ${PROJECT_SOURCE_DIR }) STRING(REPLACE "/" "\\" PROJECT_SOURCE_DIR_WINPATH ${PROJECT_SOURCE_DIR })
STRING(REPLACE "/" "\\" PROJECT_BINARY_DIR_WINPATH ${PROJECT_BINARY_DIR }) STRING(REPLACE "/" "\\" PROJECT_BINARY_DIR_WINPATH ${PROJECT_BINARY_DIR })
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/util/copy-translations.bat.cmake $ {PROJECT_SOURCE_DIR}/util/copy-translations.bat @ONLY NEWLINE_STYLE WIN32) CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/copy-translations.bat.cmake ${PROJECT_SOURCE_DIR}/util/copy-translations.bat @ONLY NEWLINE_STYLE WIN32)
ENDIF() ENDIF()
########### Top level include directories ########### ########### Top level include directories ###########
# This will be used for all compilations in sub-directories # This will be used for all compilations in sub-directories
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/modules ${CMAKE_SOURCE_DIR}/src/core/modules
${CMAKE_SOURCE_DIR}/src/core/planetsephems ${CMAKE_SOURCE_DIR}/src/core/planetsephems
${CMAKE_SOURCE_DIR}/src/core/external ${CMAKE_SOURCE_DIR}/src/core/external
${CMAKE_SOURCE_DIR}/src/core/external/qtcompress ${CMAKE_SOURCE_DIR}/src/core/external/qtcompress
${CMAKE_SOURCE_DIR}/src/core/external/qcustomplot
${CMAKE_SOURCE_DIR}/src/core/external/glues_stel/source/ ${CMAKE_SOURCE_DIR}/src/core/external/glues_stel/source/
${CMAKE_SOURCE_DIR}/src/core/external/glues_stel/source/libtess ${CMAKE_SOURCE_DIR}/src/core/external/glues_stel/source/libtess
${CMAKE_SOURCE_DIR}/src/gui ${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/scripting ${CMAKE_SOURCE_DIR}/src/scripting
${INTL_INCLUDE_DIR} ${INTL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
) )
########### Subdirectories ############### ########### Subdirectories ###############
 End of changes. 35 change blocks. 
80 lines changed or deleted 183 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/