CMakeLists.txt   CMakeLists.txt 
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)) IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0))
CMAKE_POLICY(SET CMP0050 OLD) CMAKE_POLICY(SET CMP0050 OLD)
# silently ignore errors in add_dependency(): # silently ignore errors in add_dependency():
CMAKE_POLICY(SET CMP0046 OLD) CMAKE_POLICY(SET CMP0046 OLD)
ENDIF() ENDIF()
# just avoid a warning mess. # just avoid a warning mess.
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") SET(STELLARIUM_MAJOR "0")
SET(STELLARIUM_MINOR "13") SET(STELLARIUM_MINOR "14")
SET(STELLARIUM_PATCH "3") SET(STELLARIUM_PATCH "0")
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-2015")
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}")
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, opti ons are: None Debug GProf Valgrind Release RelWithDebInfo MinSizeRel." FORC E) 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()
# 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)
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()
IF(WIN32) IF(WIN32)
IF(NOT MSVC) IF(NOT MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexceptions -fident -mthread SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexceptions -fident -m
s -Wno-unused-parameter -Wno-unused-result") threads -Wno-unused-parameter -Wno-unused-result")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fident -mth SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fiden
reads -Wno-unused-parameter -Wno-unused-result") t -mthreads -Wno-unused-parameter -Wno-unused-result")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fexceptions -fid SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fexception
ent -mthreads -mwindows") s -fident -mthreads -mwindows")
ELSE() ELSE()
# _USE_MATH_DEFINES Prevent MSVC from complaining about M_PI no matter # _USE_MATH_DEFINES Prevent MSVC from complaining about M_PI no m
where <cmath> is included first atter where <cmath> is included first
# 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_SE ADD_DEFINITIONS(-D_USE_MATH_DEFINES -DNOMINMAX -D_WINSOCKAPI_ /D_
CURE_NO_WARNINGS /wd4244 /wd4005 /wd4101 /wd4996 /wd4305 /wd4805) CRT_SECURE_NO_WARNINGS /wd4244 /wd4005 /wd4101 /wd4996 /wd4305 /wd4805)
ENDIF() ENDIF()
ELSE() ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-paramete
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-paramet r")
er -Wno-unused-result") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-para
meter -Wno-unused-result")
ENDIF() ENDIF()
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # CMake 3.0.0 the CMAKE_<LANG>_COMPILER_ID value for Apple-provided Clang i
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unused-p s now AppleClang
rivate-field -Wno-uninitialized -Wno-tautological-constant-out-of-range-com IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
pare") # using regular Clang or AppleClang
# The cosmetic fix for Clang 3.4 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unus
IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.3) ed-private-field -Wno-uninitialized -Wno-tautological-constant-out-of-range
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variable -Wno-u -compare")
nused-result") # The cosmetic fix for Clang 3.4
ENDIF() IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.3)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variabl
e -Wno-unused-result")
ENDIF()
ENDIF() ENDIF()
# FreeBSD-specific compiler flags # FreeBSD-specific compiler flags
# resolve bug for FreeBSD/amd64 and NVIDIA proprietary drivers # resolve bug for FreeBSD/amd64 and NVIDIA proprietary drivers
IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
# Use -pthread compilation option to properly link to threading library # Use -pthread compilation option to properly link to threading librar
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") y
IF(${GCC_VERSION} VERSION_GREATER 4.7) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") IF(${GCC_VERSION} VERSION_GREATER 4.7)
ENDIF() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedef
s")
ENDIF()
ENDIF() ENDIF()
# best way to get to APPLE? # best way to get to APPLE?
IF(APPLE) IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Wall -Wextra") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Wall -Wextra")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # using regular Clang or AppleClang
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field -Wno- IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
unknown-warning-option -Wno-unused-const-variable -Wno-unused-result") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field
ENDIF() -Wno-unknown-warning-option -Wno-unused-const-variable -Wno-unused-result"
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unused- )
parameter") ENDIF()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unu
sed-parameter")
# We support only 64 bits MacOSX # We support only 64 bits MacOSX
SET(CMAKE_OSX_ARCHITECTURES "x86_64") SET(CMAKE_OSX_ARCHITECTURES "x86_64")
ENDIF() ENDIF()
# This activates Link Time Optimization on recent GCC # This activates Link Time Optimization on recent GCC
# Unfortunately, it also seems to break static plugins # Unfortunately, it also seems to break static plugins
# It's providing a 20% size reduction, and probably a faster code when acti vated # It's providing a 20% size reduction, and probably a faster code when acti vated
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -ffunction-section s -flto") #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -ffunction-section s -flto")
#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(RELEASE_BUILD 1 CACHE BOOL "Flag this build as an official release.") SET(RELEASE_BUILD 1 CACHE BOOL "Flag this build as an official release.")
IF(RELEASE_BUILD)
ADD_DEFINITIONS(-DRELEASE_BUILD)
ENDIF()
# Activate sound support # Activate sound support
SET(ENABLE_SOUND 0 CACHE BOOL "Define whether sound support should be activ ated.") 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 scrip SET(ENABLE_SCRIPT_CONSOLE 1 CACHE BOOL "Define whether to build the sc
t console feature.") 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)
ENDIF() ENDIF()
SET(GUI_MODE Standard CACHE STRING "Choose the type of GUI to build, option s are: Standard, None") SET(GUI_MODE Standard CACHE STRING "Choose the type of GUI to build, option s are: Standard, None")
SET(GENERATE_PACKAGE_TARGET 1 CACHE BOOL "Set to 1 or true if you want to h ave make package target") SET(GENERATE_PACKAGE_TARGET 1 CACHE BOOL "Set to 1 or true if you want to h ave make package target")
# 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()
########### 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 ${NAME SET(USE_PLUGIN_${NAME_UP} ${DEFAULT} CACHE BOOL "Define wheter the ${N
} plugin should be created.") AME} 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)
ADD_PLUGIN(Exoplanets 1) ADD_PLUGIN(Exoplanets 1)
skipping to change at line 196 skipping to change at line 204
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
IF(USE_PLUGIN_LOGBOOK) IF(USE_PLUGIN_LOGBOOK)
SET(QT_USE_QTSQL TRUE) # For LogBook we also need SQL module SET(QT_USE_QTSQL TRUE) # For LogBook we also need SQL module
ENDIF() ENDIF()
# Custom target used to manage dependencies of stellarium -> Static plugins # Custom target used to manage dependencies of stellarium -> Static plugins
# It is important that static plugins are compiled before stellarium main e xecutable is linked # It is important that static plugins are compiled before stellarium main e xecutable is linked
ADD_CUSTOM_TARGET(AllStaticPlugins ALL) ADD_CUSTOM_TARGET(AllStaticPlugins ALL)
########### Find packages ########### ########### Find packages ###########
FIND_PACKAGE(Qt5Core REQUIRED) FIND_PACKAGE(Qt5Core REQUIRED)
GET_TARGET_PROPERTY(QMAKE_LOCATION Qt5::qmake LOCATION) GET_TARGET_PROPERTY(QMAKE_LOCATION Qt5::qmake LOCATION)
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 ver sion \"${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}\", required is \"${MINIMAL_QT_VERSION}\")") MESSAGE(STATUS "Found Qt5: ${QMAKE_LOCATION} (found suitable version \ "${Qt5Core_VERSION_STRING}\")")
ENDIF() ENDIF()
FIND_PACKAGE(Qt5Concurrent REQUIRED) FIND_PACKAGE(Qt5Concurrent REQUIRED)
FIND_PACKAGE(Qt5Declarative 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)
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)
skipping to change at line 245 skipping to change at line 252
FIND_PACKAGE(Qt5MultimediaWidgets REQUIRED) FIND_PACKAGE(Qt5MultimediaWidgets REQUIRED)
INCLUDE_DIRECTORIES(${Qt5Multimedia_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Qt5Multimedia_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()
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/external/zlib) SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/external/zlib)
ENDIF() ENDIF()
FIND_PACKAGE(Qt5Test) FIND_PACKAGE(Qt5Test)
INCLUDE_DIRECTORIES(${Qt5Test_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Qt5Test_INCLUDE_DIRS})
########### Set some global variables ########### ########### Set some global variables ###########
IF(UNIX AND NOT WIN32) IF(UNIX AND NOT WIN32)
IF(APPLE) IF(APPLE)
SET(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Stellarium.app/Cont ents") SET(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/Stellarium.app/Cont ents")
ELSE() ELSE()
skipping to change at line 275 skipping to change at line 282
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 RELEASE_BUILD) IF(NOT RELEASE_BUILD)
#Hack until CMake detection for Bazaar is finished #Hack until CMake detection for Bazaar is finished
IF(BZR_REVISION) IF(BZR_REVISION)
SET(PACKAGE_VERSION "bzr${BZR_REVISION}") SET(PACKAGE_VERSION "bzr${BZR_REVISION}")
ADD_DEFINITIONS(-DBZR_REVISION="${BZR_REVISION}") ADD_DEFINITIONS(-DBZR_REVISION="${BZR_REVISION}")
ENDIF() ENDIF()
IF(DEV_VERSION)
ADD_DEFINITIONS(-DDEV_VERSION="${DEV_VERSION}")
ENDIF()
ENDIF() ENDIF()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/stellarium.exe.manifest.cmake ${CMA KE_SOURCE_DIR}/data/stellarium.exe.manifest @ONLY) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/stellarium.exe.manifest.cmake ${CMA KE_SOURCE_DIR}/data/stellarium.exe.manifest @ONLY)
### [Optional] Embed icon in the Windows executable ### ### [Optional] Embed icon in the Windows executable ###
IF(WIN32) IF(WIN32)
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.
skipping to change at line 301 skipping to change at line 311
ENDIF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH) ENDIF(ENABLE_WINDOWS_EXE_ICON AND NOT RC_COMPILER_PATH)
ENDIF() ENDIF()
### Generate an Inno Setup project file ### ### Generate an Inno Setup project file ###
IF(WIN32) IF(WIN32)
# 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")
SET(REDIST_VERSION "VC_REDIST_X86")
IF(MSVC) IF(MSVC)
#SET(REDIST_FILES "Source: \"${CMAKE_INSTALL_PREFIX}/bin/msvc*.dl SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v
l\"; DestDir: \"{app}\";") credist_x86.exe\"; DestDir: \"{tmp}\";")
SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/vcr SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x86.exe\"; Parameter
edist_x86.exe\"; DestDir: \"{tmp}\";") s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x86.exe\"; Parameters: {cm:RedistRun}\"; Check: VCRedistNeedsInstall")
\"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"{c
m:RedistRun}\"")
ELSE() ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.dll SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d
\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_dw2-1.dl ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_dw2-1.
l\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*.d dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*
ll\"; DestDir: \"{app}\";") .dll\"; DestDir: \"{app}\";")
SET(REDIST_RUN "; Redistributable package not required for MinGW" 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")
SET(REDIST_VERSION "VC_REDIST_X64")
IF(MSVC) IF(MSVC)
#SET(REDIST_FILES "Source: \"${CMAKE_INSTALL_PREFIX}/bin/msvc*.dl SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/v
l\"; DestDir: \"{app}\";") credist_x64.exe\"; DestDir: \"{tmp}\";")
SET(REDIST_FILES "Source: \"${CMAKE_SOURCE_DIR}/util/vcredist/vcr SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x64.exe\"; Parameter
edist_x64.exe\"; DestDir: \"{tmp}\";") s: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x64.exe\"; Parameters: {cm:RedistRun}\"; Check: VCRedistNeedsInstall")
\"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"{c
m:RedistRun}\"")
ELSE() ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.dll SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.d
\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*.dl ll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libwinpthread*.
l\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_sjlj*.d dll\"; DestDir: \"{app}\";\nSource: \"${MINGW_BIN_DIRECTORY}/libgcc_s_sjlj*
ll\"; DestDir: \"{app}\";") .dll\"; DestDir: \"{app}\";")
SET(REDIST_RUN "; Redistributable package not required for MinGW" 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.")
IF(GENERATE_STELMAINLIB) IF(GENERATE_STELMAINLIB)
SET(STELMAINLIB "Source: \"${CMAKE_INSTALL_PREFIX}/lib/libstelMain. dll\"; DestDir: \"{app}\";") SET(STELMAINLIB "Source: \"${CMAKE_INSTALL_PREFIX}/lib/libstelMain. dll\"; DestDir: \"{app}\";")
SET(MESALIB "; MESA libraries isn't used")
ELSE() ELSE()
SET(STELMAINLIB "; StelMainLib don't used") SET(STELMAINLIB "; StelMainLib isn't used")
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(QtDeclarative_location Qt5::Declarative 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)
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 don't used") SET(ISS_QT_SCRIPT "; QtScript isn't used")
ENDIF() ENDIF()
IF(ENABLE_SOUND) IF(ENABLE_SOUND)
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 don'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)
SET(ISS_ANGLE_LIBS "; ANGLE support (libEGL.dll, libGLESv2.dll and d3dcompiler_*.dll)\nSource: \"${QT5_LIBS}/libEGL.dll\"; DestDir: \"{app}\"; \nSource: \"${QT5_LIBS}/libGLESv2.dll\"; DestDir: \"{app}\";\nSource: \"${Q T5_LIBS}/d3dcompiler_*.dll\"; DestDir: \"{app}\";") SET(ISS_ANGLE_LIBS "; ANGLE support (libEGL.dll, libGLESv2.dll and d3dcompiler_*.dll)\nSource: \"${QT5_LIBS}/libEGL.dll\"; DestDir: \"{app}\"; \nSource: \"${QT5_LIBS}/libGLESv2.dll\"; DestDir: \"{app}\";\nSource: \"${Q T5_LIBS}/d3dcompiler_*.dll\"; DestDir: \"{app}\";")
ELSE() ELSE()
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_WINDOWS_PLUGIN "Source: \"${QT5_LIBS}/../plugins/platforms/qwin dows.dll\"; DestDir: \"{app}/platforms/\";") SET(ISS_WINDOWS_PLUGIN "Source: \"${QT5_LIBS}/../plugins/platforms/qwin dows.dll\"; DestDir: \"{app}/platforms/\";")
SET(ISS_ICO_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qico. dll\"; DestDir: \"{app}/imageformats/\";") SET(ISS_ICO_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qico. dll\"; DestDir: \"{app}/imageformats/\";")
SET(ISS_JPEG_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qjpe g.dll\"; DestDir: \"{app}/imageformats/\";") SET(ISS_JPEG_PLUGIN "Source: \"${QT5_LIBS}/../plugins/imageformats/qjpe g.dll\"; DestDir: \"{app}/imageformats/\";")
IF(ENABLE_SOUND) IF(ENABLE_SOUND)
SET(ISS_MULTIMEDIA_PLUGINS "Source: \"${QT5_LIBS}/../plugins/medias ervice/dsengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource: \"${QT5_L IBS}/../plugins/mediaservice/qtmedia_audioengine.dll\"; DestDir: \"{app}/me diaservice/\";\nSource: \"${QT5_LIBS}/../plugins/playlistformats/qtmultimed ia_m3u.dll\"; DestDir: \"{app}/playlistformats/\";") SET(ISS_MULTIMEDIA_PLUGINS "Source: \"${QT5_LIBS}/../plugins/medias ervice/dsengine.dll\"; DestDir: \"{app}/mediaservice/\";\nSource: \"${QT5_L IBS}/../plugins/mediaservice/qtmedia_audioengine.dll\"; DestDir: \"{app}/me diaservice/\";\nSource: \"${QT5_LIBS}/../plugins/playlistformats/qtmultimed ia_m3u.dll\"; DestDir: \"{app}/playlistformats/\";")
ELSE() ELSE()
SET(ISS_MULTIMEDIA_PLUGINS "; QtMultimedia don't used") SET(ISS_MULTIMEDIA_PLUGINS "; QtMultimedia isn't used")
ENDIF() ENDIF()
SET(ISS_QML_DIR "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmldi r\"; DestDir: \"{app}/Qt/labs/shaders/\";") SET(ISS_QML_DIR "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmldi r\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_PLUGINS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/p lugins.qmltypes\"; DestDir: \"{app}/Qt/labs/shaders/\";") SET(ISS_QML_PLUGINS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/p lugins.qmltypes\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_SHADERS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/q mlshadersplugin.dll\"; DestDir: \"{app}/Qt/labs/shaders/\";") SET(ISS_QML_SHADERS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/q mlshadersplugin.dll\"; DestDir: \"{app}/Qt/labs/shaders/\";")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium.iss.cmake ${CMAKE_SOURCE_ DIR}/stellarium.iss @ONLY) 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) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/stellarium-patch.iss.cmake ${CMAKE_S OURCE_DIR}/stellarium-patch.iss @ONLY)
ENDIF() ENDIF()
IF(APPLE) IF(APPLE)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/Info.plist.cmake ${CMAKE_SOURCE _DIR}/data/Info.plist @ONLY) 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}/data/default_config.ini.cmake ${CMAKE_SO URCE_DIR}/data/default_config.ini @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/updates.json.cmake ${CMAKE_SOURCE_D IR}/data/updates.json @ONLY)
########### uninstall files ############### ########### uninstall files ###############
CONFIGURE_FILE( CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/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.cmake" ) "${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 p SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Stellarium is a free open source
lanetarium for your computer. It shows a realistic sky in 3D, just like wha planetarium for your computer. It shows a realistic sky in 3D, just like w
t you see with the naked eye, binoculars or a telescope.") 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_PACKAGE_VERSION_MAJOR ${STELLARIUM_MAJOR}) SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_VERSION_MINOR ${STELLARIUM_MINOR}) SET(CPACK_PACKAGE_VERSION_MAJOR ${STELLARIUM_MAJOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${STELLARIUM_PATCH}) SET(CPACK_PACKAGE_VERSION_MINOR ${STELLARIUM_MINOR})
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "stellarium") SET(CPACK_PACKAGE_VERSION_PATCH ${STELLARIUM_PATCH})
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "stellarium-${VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "stellarium")
SET(CPACK_SOURCE_GENERATOR "TGZ") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "stellarium-${VERSION}")
SET(CPACK_GENERATOR "TGZ") SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_STRIP_FILES "bin/stellarium") SET(CPACK_GENERATOR "TGZ")
SET(CPACK_PACKAGE_EXECUTABLES "stellarium" "Stellarium") SET(CPACK_STRIP_FILES "bin/stellarium")
SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/.svn/" "/.git/" "/.bzr/" "builds/ SET(CPACK_PACKAGE_EXECUTABLES "stellarium" "Stellarium")
" "installers/" "Stellarium.tag$" "Stellarium.kdevelop.pcs$" "/CMakeLists.t SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/.svn/" "/.git/" "/.bzr/" "build
xt.user$" "\\\\.bzrignore$" "~$" "\\\\.swp$" "\\\\.#" "/#") s/" "installers/" "Stellarium.tag$" "Stellarium.kdevelop.pcs$" "/CMakeLists
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+") .txt.user$" "\\\\.bzrignore$" "~$" "\\\\.swp$" "\\\\.#" "/#")
SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics") SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+")
SET(CPACK_RPM_PACKAGE_URL "http://stellarium.org/") SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <stellarium- SET(CPACK_RPM_PACKAGE_URL "http://stellarium.org/")
pubdevel@lists.sourceforge.net>") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <stellariu
SET(CPACK_DEBIAN_PACKAGE_SECTION "science") m-pubdevel@lists.sourceforge.net>")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION}+deb1") SET(CPACK_DEBIAN_PACKAGE_SECTION "science")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}") SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION}+deb1")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}")
INCLUDE(CPack) SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
INCLUDE(CPack)
ENDIF() ENDIF()
########### Macosx Bundling ############### ########### Macosx Bundling ###############
IF(APPLE) IF(APPLE)
# ${Qt5Core_INCLUDE_DIRS} is a list; I'm expecting the first entry t # ${Qt5Core_INCLUDE_DIRS} is a list; I'm expecting the first entry to
o always be QtCore.framework. always be QtCore.framework.
ADD_CUSTOM_TARGET( ADD_CUSTOM_TARGET(
mac_app mac_app
python util/mac_app.py ${CMAKE_INSTALL_PREFIX} ${PROJECT_SOU python util/mac_app.py ${CMAKE_INSTALL_PREFIX} ${PROJECT_SOURCE_D
RCE_DIR} ${CMAKE_BUILD_TYPE} ${Qt5Core_INCLUDE_DIRS} IR} ${CMAKE_BUILD_TYPE} ${Qt5Core_INCLUDE_DIRS}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Stellarium.app DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Stellarium.app
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "making the macosx bundle." COMMENT "making the macosx bundle."
VERBATIM VERBATIM
) )
ENDIF() ENDIF()
########### Generate doxygen doc ############### ########### Generate doxygen doc ###############
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_ DIR}/Doxyfile @ONLY) CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_ DIR}/Doxyfile @ONLY)
ADD_CUSTOM_TARGET(apidoc doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKI NG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate the doxygen docu mentation into the doc directory.") ADD_CUSTOM_TARGET(apidoc doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKI NG_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate the doxygen docu mentation into the doc directory.")
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile-plugins.cmake ${CMAKE_CURRENT
_BINARY_DIR}/Doxyfile-plugins @ONLY)
ADD_CUSTOM_TARGET(apidoc-plugins doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfi
le-plugins WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate
the doxygen documentation into the doc-plugins directory.")
##################### 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}) })
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/util/copy-translations.bat.cmake ${PR STRING(REPLACE "/" "\\" PROJECT_BINARY_DIR_WINPATH ${PROJECT_BINARY_DIR
OJECT_SOURCE_DIR}/util/copy-translations.bat @ONLY NEWLINE_STYLE WIN32) })
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/util/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/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 ###############
ADD_SUBDIRECTORY( data ) ADD_SUBDIRECTORY( data )
ADD_SUBDIRECTORY( src ) ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( textures ) ADD_SUBDIRECTORY( textures )
ADD_SUBDIRECTORY( doc ) ADD_SUBDIRECTORY( doc )
IF(ENABLE_NLS) IF(ENABLE_NLS)
ADD_SUBDIRECTORY( po ) ADD_SUBDIRECTORY( po )
ENDIF() ENDIF()
ADD_SUBDIRECTORY( landscapes ) ADD_SUBDIRECTORY( landscapes )
ADD_SUBDIRECTORY( skycultures ) ADD_SUBDIRECTORY( skycultures )
ADD_SUBDIRECTORY( nebulae ) ADD_SUBDIRECTORY( nebulae )
IF(ENABLE_SCRIPTING) IF(ENABLE_SCRIPTING)
ADD_SUBDIRECTORY( scripts ) ADD_SUBDIRECTORY( scripts )
ENDIF() ENDIF()
if(USE_PLUGIN_SCENERY3D) IF(USE_PLUGIN_SCENERY3D)
# add scenery3d scenes # add scenery3d scenes
ADD_SUBDIRECTORY( scenery3d ) ADD_SUBDIRECTORY( scenery3d )
ENDIF() ENDIF()
ADD_SUBDIRECTORY( stars ) ADD_SUBDIRECTORY( stars )
ADD_SUBDIRECTORY( plugins ) ADD_SUBDIRECTORY( plugins )
 End of changes. 56 change blocks. 
182 lines changed or deleted 204 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/