CMakeLists.txt   CMakeLists.txt 
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) 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():
CMAKE_POLICY(SET CMP0046 OLD)
ENDIF()
# just avoid a warning mess.
IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO
N}" LESS 3.0.2))
CMAKE_POLICY(SET CMP0043 OLD)
ENDIF()
IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSIO
N}" LESS 3.1.3))
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 "13")
SET(STELLARIUM_PATCH "2") SET(STELLARIUM_PATCH "3")
SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}") SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}")
SET(PACKAGE stellarium) SET(PACKAGE stellarium)
SET(PACKAGE_VERSION "${VERSION}") SET(PACKAGE_VERSION "${VERSION}")
ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}") ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}")
SET(MINIMAL_QT_VERSION "5.2.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 Debug CACHE STRING "Choose the type of build, option s are: None Debug GProf Valgrind Release RelWithDebInfo MinSizeRel." FORCE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, opti ons are: None Debug GProf Valgrind Release RelWithDebInfo MinSizeRel." FORC E)
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
skipping to change at line 80 skipping to change at line 91
ENDIF() ENDIF()
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unused-p rivate-field -Wno-uninitialized -Wno-tautological-constant-out-of-range-com pare") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wno-unused-p rivate-field -Wno-uninitialized -Wno-tautological-constant-out-of-range-com pare")
# 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-variable -Wno-u nused-result") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variable -Wno-u nused-result")
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(OPTIMIZE_INTEL_ATOM 0 CACHE BOOL "Activate optimizations for atom proce
ssor.")
IF(OPTIMIZE_INTEL_ATOM)
IF (MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2 ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2 ")
ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=generic -msse -msse2 -msse3 -m
fpmath=sse")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic -msse -msse2 -msse
3 -mfpmath=sse")
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 library
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
IF(${GCC_VERSION} VERSION_GREATER 4.7) IF(${GCC_VERSION} VERSION_GREATER 4.7)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
ENDIF() ENDIF()
ENDIF() ENDIF()
skipping to change at line 113 skipping to change at line 113
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") IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field -Wno- unknown-warning-option -Wno-unused-const-variable -Wno-unused-result") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field -Wno- unknown-warning-option -Wno-unused-const-variable -Wno-unused-result")
ENDIF() ENDIF()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unused- parameter") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unused- 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
# Unfortunately, it also seems to break static plugins
# 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_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")
########### 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.")
# 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 t console feature.") SET(ENABLE_SCRIPT_CONSOLE 1 CACHE BOOL "Define whether to build the scrip t console feature.")
IF(ENABLE_SCRIPT_CONSOLE) IF(ENABLE_SCRIPT_CONSOLE)
ADD_DEFINITIONS(-DENABLE_SCRIPT_CONSOLE) ADD_DEFINITIONS(-DENABLE_SCRIPT_CONSOLE)
ENDIF() ENDIF()
SET(ENABLE_STRATOSCRIPT_COMPAT 0 CACHE BOOL "Set to 1 or true if you want to build the Stratoscript compatibility mode")
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, External") 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)
skipping to change at line 164 skipping to change at line 170
STRING(TOUPPER ${NAME} NAME_UP) STRING(TOUPPER ${NAME} NAME_UP)
SET(USE_PLUGIN_${NAME_UP} ${DEFAULT} CACHE BOOL "Define wheter the ${NAME } plugin should be created.") SET(USE_PLUGIN_${NAME_UP} ${DEFAULT} CACHE BOOL "Define wheter 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(CompassMarks 1) ADD_PLUGIN(CompassMarks 1)
ADD_PLUGIN(Exoplanets 1) ADD_PLUGIN(Exoplanets 1)
ADD_PLUGIN(EquationOfTime 1) ADD_PLUGIN(EquationOfTime 1)
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)
ADD_PLUGIN(Satellites 1) ADD_PLUGIN(Satellites 1)
ADD_PLUGIN(Scenery3d 1)
ADD_PLUGIN(SolarSystemEditor 1) ADD_PLUGIN(SolarSystemEditor 1)
ADD_PLUGIN(Supernovae 1) ADD_PLUGIN(Supernovae 1)
ADD_PLUGIN(SVMT 0)
ADD_PLUGIN(TextUserInterface 1) ADD_PLUGIN(TextUserInterface 1)
ADD_PLUGIN(TelescopeControl 1) ADD_PLUGIN(TelescopeControl 1)
ADD_PLUGIN(TimeZoneConfiguration 1) ADD_PLUGIN(TimeZoneConfiguration 1)
ADD_PLUGIN(VirGO 0)
########## 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_SVMT)
SET(QT_USE_QTXML TRUE) # For SVMT we also need QtXml module
SET(QT_USE_QTDECLARATIVE TRUE) # For SVMT we also need QML module, this
line doesn't seem to work right now
SET(QT_USE_QTWEBKIT TRUE) # For SVMT we also need QML module, this line
doesn't seem to work right now
ENDIF()
IF(USE_PLUGIN_VIRGO)
## Library for loading FITS image files
FIND_PATH(CFITSIO_INCLUDE_DIR fitsio.h
/usr/include
/usr/local/include
DOC "Should point to the directory where the include files for libc
fitsio are installed")
FIND_LIBRARY(CFITSIO_LIBRARIES cfitsio
PATHS
/usr/lib/
/usr/local/lib
/opt/local/lib
DOC "cfitsio link options")
SET(QT_USE_QTXML TRUE) # For VirGO we also need QtXml module
ENDIF()
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 ###########
skipping to change at line 291 skipping to change at line 277
########### 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()
ENDIF() ENDIF()
IF(ENABLE_STRATOSCRIPT_COMPAT)
ADD_DEFINITIONS(-DENABLE_STRATOSCRIPT_COMPAT)
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.
SET(RC_COMPILER_FILENAME "windres.exe") SET(RC_COMPILER_FILENAME "windres.exe")
FIND_FILE(RC_COMPILER_PATH ${RC_COMPILER_FILENAME}) FIND_FILE(RC_COMPILER_PATH ${RC_COMPILER_FILENAME})
skipping to change at line 499 skipping to change at line 481
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)
# add scenery3d scenes
ADD_SUBDIRECTORY( scenery3d )
ENDIF()
ADD_SUBDIRECTORY( stars ) ADD_SUBDIRECTORY( stars )
ADD_SUBDIRECTORY( plugins ) ADD_SUBDIRECTORY( plugins )
 End of changes. 16 change blocks. 
49 lines changed or deleted 35 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/