Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fixes for running on Android #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 38 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ SET(CMAKE_WARN_DEPRECATED 1)

SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)

SET( QT_ANDROID_APPLICATION_BINARY stellarium )
SET( ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android )

########### Project name ###########
PROJECT(Stellarium C CXX)

Expand Down Expand Up @@ -124,7 +127,7 @@ ELSE()
ENDIF()

# Use customized cmake macros
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
INCLUDE(CPM)

# Show platform info
Expand Down Expand Up @@ -381,6 +384,9 @@ IF(ENABLE_LTO)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_CXX_FLAGS}")
ENDIF()
ELSEIF(UNIX)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF()

########### Others ###########
Expand Down Expand Up @@ -425,9 +431,9 @@ ENDIF()
IF(ENABLE_SPOUT)
ADD_DEFINITIONS(-DENABLE_SPOUT)
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") # 32bit build?
SET(SPOUT_PATH_HINT ${CMAKE_SOURCE_DIR}/util/spout2/Win32/)
SET(SPOUT_PATH_HINT ${PROJECT_SOURCE_DIR}/util/spout2/Win32/)
ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # 64bit build?
SET(SPOUT_PATH_HINT ${CMAKE_SOURCE_DIR}/util/spout2/x64/)
SET(SPOUT_PATH_HINT ${PROJECT_SOURCE_DIR}/util/spout2/x64/)
ENDIF()

# make sure the .lib file is used, otherwise MinGW will try the .dll directly and fails to link
Expand All @@ -441,7 +447,7 @@ IF(ENABLE_SPOUT)
# try to find the .dll for automatic copy
GET_FILENAME_COMPONENT(SPOUT_LIBRARY_DIR ${SPOUT_LIBRARY} DIRECTORY)
SET(SPOUT_LIBRARY_DLL ${SPOUT_LIBRARY_DIR}/SpoutLibrary.dll CACHE FILEPATH "The path to the Spout .dll file")
SET(SPOUT_LIBRARY_LICENCE ${CMAKE_SOURCE_DIR}/util/spout2/licence.txt CACHE FILEPATH "The path to the Spout licence file")
SET(SPOUT_LIBRARY_LICENCE ${PROJECT_SOURCE_DIR}/util/spout2/licence.txt CACHE FILEPATH "The path to the Spout licence file")

IF(NOT EXISTS ${SPOUT_LIBRARY_DLL})
UNSET(SPOUT_LIBRARY_DLL)
Expand Down Expand Up @@ -483,14 +489,14 @@ SET(GENERATE_PACKAGE_TARGET 1 CACHE BOOL "Set to 1 or true if you want to have m
# 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
# 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)) OR UNIX OR ANDROID )
SET(GENERATE_STELMAINLIB 1)
ELSE()
SET(GENERATE_STELMAINLIB 0)
ENDIF()

########### User Guide ###############
IF(EXISTS "${CMAKE_SOURCE_DIR}/guide/guide.pdf")
IF(EXISTS "${PROJECT_SOURCE_DIR}/guide/guide.pdf")
MESSAGE(STATUS "Found Stellarium User Guide")
INSTALL(FILES guide/guide.pdf DESTINATION ${SDATALOC}/guide)
SET(ISS_GUIDE "Name: \"{group}\\{cm:UserGuide}\"; Filename: \"{app}\\guide\\guide.pdf\"")
Expand Down Expand Up @@ -609,6 +615,19 @@ IF(WIN32)
ENDIF()
ENDIF()

IF(ANDROID)
# FIND_PACKAGE( Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS AndroidExtras )

FIND_FILE(OPENSSL_SSL_LIBRARY_DLL libssl_1_1.so)
FIND_FILE(OPENSSL_CRYPTO_LIBRARY_DLL libcrypto_1_1.so)

IF( (EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) AND (EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL}) )
SET( ANDROID_EXTRA_LIBS ${OPENSSL_SSL_LIBRARY_DLL} ${OPENSSL_CRYPTO_LIBRARY_DLL} CACHE INTERNAL "" )
ELSE()
message( "OpenSSL libraries not found" )
ENDIF()
ENDIF()

IF(APPLE)
IF(${QT_VERSION_MAJOR} EQUAL 6)
FIND_PACKAGE(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
Expand Down Expand Up @@ -781,7 +800,7 @@ ENDIF()

IF(NOT USE_SYSTEM_ZLIB)
#use our own zlib
MESSAGE(STATUS "Using bundled zlib version at ${CMAKE_SOURCE_DIR}/src/external/zlib")
MESSAGE(STATUS "Using bundled zlib version at ${PROJECT_SOURCE_DIR}/src/external/zlib")
SET(ZLIB_LIBRARIES zlib_stel)
ELSE()
MESSAGE(STATUS "Using system-provided zlib at ${ZLIB_LIBRARIES}")
Expand Down Expand Up @@ -821,10 +840,10 @@ ELSE()
ADD_DEFINITIONS(-DINSTALL_DATADIR=".")
ADD_DEFINITIONS(-DINSTALL_LOCALEDIR="./locale")
ENDIF()
# For not installed debug builds with build directory path that not match sources directory path ${PROJECT_BINARY_DIR} != ${CMAKE_SOURCE_DIR}
# For not installed debug builds with build directory path that not match sources directory path ${PROJECT_BINARY_DIR} != ${PROJECT_SOURCE_DIR}
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
ADD_DEFINITIONS(-DINSTALL_DATADIR_FOR_DEBUG="${CMAKE_SOURCE_DIR}")
ADD_DEFINITIONS(-DINSTALL_LOCALEDIR_FOR_DEBUG="${CMAKE_SOURCE_DIR}")
ADD_DEFINITIONS(-DINSTALL_DATADIR_FOR_DEBUG="${PROJECT_SOURCE_DIR}")
ADD_DEFINITIONS(-DINSTALL_LOCALEDIR_FOR_DEBUG="${PROJECT_SOURCE_DIR}")
ENDIF()

IF(WIN32)
Expand All @@ -845,7 +864,7 @@ IF(WIN32)
SET(WINDOWS_PACKAGE_VERSION "${VERSION}.0")
SET(PACKAGE_VERSION_RC "${WINDOWS_PACKAGE_VERSION}")
STRING(REGEX REPLACE "([.]+)" "," PACKAGE_VERSION_RC ${PACKAGE_VERSION_RC})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/stellarium.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/stellarium.rc @ONLY)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/stellarium.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/stellarium.rc @ONLY)

#######################################################
### [Optional] Embed icon in the Windows executable
Expand Down Expand Up @@ -906,7 +925,7 @@ IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
ADD_DEFINITIONS(-DNDEBUG)
ENDIF()

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/default_cfg.ini.cmake ${CMAKE_SOURCE_DIR}/data/default_cfg.ini @ONLY)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/default_cfg.ini.cmake ${PROJECT_SOURCE_DIR}/data/default_cfg.ini @ONLY)

########### uninstall files ###############
CONFIGURE_FILE(
Expand Down Expand Up @@ -961,7 +980,7 @@ IF(APPLE)
SET(PACKAGE_OSX_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
ADD_DEFINITIONS(-DPACKAGE_OSX_TARGET)

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Info.plist.cmake ${CMAKE_SOURCE_DIR}/data/Info.plist @ONLY)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/Info.plist.cmake ${PROJECT_SOURCE_DIR}/data/Info.plist @ONLY)

GET_FILENAME_COMPONENT(_qt_bin_dir "${QMAKE_LOCATION}" DIRECTORY)
FIND_PROGRAM(MACDEPLOYQT_COMMAND macdeployqt HINTS "${_qt_bin_dir}")
Expand Down Expand Up @@ -1015,12 +1034,12 @@ ENDIF()
# This will be used for all compilations in sub-directories
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/modules
${CMAKE_SOURCE_DIR}/src/core/planetsephems
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/scripting
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/core
${PROJECT_SOURCE_DIR}/src/core/modules
${PROJECT_SOURCE_DIR}/src/core/planetsephems
${PROJECT_SOURCE_DIR}/src/gui
${PROJECT_SOURCE_DIR}/src/scripting
${INTL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/src
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ function(cpm_prettify_package_arguments OUT_VAR IS_IN_COMMENT)
string(APPEND PRETTY_OUT_VAR "#")
endif()
if(${oneArgName} STREQUAL "SOURCE_DIR")
string(REPLACE ${CMAKE_SOURCE_DIR} "\${CMAKE_SOURCE_DIR}" CPM_ARGS_${oneArgName}
string(REPLACE ${PROJECT_SOURCE_DIR} "\${PROJECT_SOURCE_DIR}" CPM_ARGS_${oneArgName}
${CPM_ARGS_${oneArgName}}
)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/CodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ include(CMakeParseArguments)
find_program( GCOV_PATH gcov )
find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl)
find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )
find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
find_program( GCOVR_PATH gcovr PATHS ${PROJECT_SOURCE_DIR}/scripts/test)
find_program( SIMPLE_PYTHON_EXECUTABLE python )

if(NOT GCOV_PATH)
Expand Down
55 changes: 26 additions & 29 deletions cmake/stellarium.iss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
; @ISS_AUTOGENERATED_WARNING@

[Setup]
@ISS_ARCHITECTURE_SPECIFIC@
@ISS_ARCHITECTURE_SPECIFIC@
DisableStartupPrompt=yes
DisableDirPage=no
DisableProgramGroupPage=no
WizardSmallImageFile=@CMAKE_SOURCE_DIR@\data\icon.bmp
WizardImageFile=@CMAKE_SOURCE_DIR@\data\splash.bmp
WizardSmallImageFile=@PROJECT_SOURCE_DIR@\data\icon.bmp
WizardImageFile=@PROJECT_SOURCE_DIR@\data\splash.bmp
WizardImageStretch=no
WizardImageBackColor=clBlack
AppName=Stellarium
Expand All @@ -21,26 +21,26 @@ AppSupportURL=@STELLARIUM_URL@
AppUpdatesURL=@STELLARIUM_URL@
VersionInfoVersion=@WINDOWS_PACKAGE_VERSION@
MinVersion=0,@ISS_MIN_WIN_VERSION@
SetupIconFile=@CMAKE_SOURCE_DIR@\data\@[email protected]
SetupIconFile=@PROJECT_SOURCE_DIR@\data\@[email protected]
OutputBaseFilename=stellarium-@ISS_PACKAGE_VERSION@-@ISS_PACKAGE_PLATFORM@
OutputDir=@CMAKE_SOURCE_DIR@\installers
OutputDir=@PROJECT_SOURCE_DIR@\installers
DefaultDirName={pf}\Stellarium
DefaultGroupName=Stellarium
UninstallDisplayIcon={app}\data\stellarium.ico
LicenseFile=@CMAKE_SOURCE_DIR@\COPYING
LicenseFile=@PROJECT_SOURCE_DIR@\COPYING
ChangesAssociations=yes
; LZMA2/ultra required 356 MB RAM for compression and 32 MB RAM for decompression
Compression=lzma2/ultra

[Files]
Source: "@CMAKE_INSTALL_PREFIX@\bin\stellarium.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_INSTALL_PREFIX@\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\data\stellarium.url"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\data\stellarium-devdocs.url"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\data\qt.conf"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\*.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\COPYING"; DestDir: "{app}"; Flags: ignoreversion; DestName: "GPL.txt"
Source: "@CMAKE_SOURCE_DIR@\ChangeLog"; DestDir: "{app}"; Flags: ignoreversion; DestName: "ChangeLog.txt"
Source: "@PROJECT_SOURCE_DIR@\data\stellarium.url"; DestDir: "{app}"; Flags: ignoreversion
Source: "@PROJECT_SOURCE_DIR@\data\stellarium-devdocs.url"; DestDir: "{app}"; Flags: ignoreversion
Source: "@PROJECT_SOURCE_DIR@\data\qt.conf"; DestDir: "{app}"; Flags: ignoreversion
Source: "@PROJECT_SOURCE_DIR@\*.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "@PROJECT_SOURCE_DIR@\COPYING"; DestDir: "{app}"; Flags: ignoreversion; DestName: "GPL.txt"
Source: "@PROJECT_SOURCE_DIR@\ChangeLog"; DestDir: "{app}"; Flags: ignoreversion; DestName: "ChangeLog.txt"
; Qt stuff
Source: "@CMAKE_INSTALL_PREFIX@\qtstuff\*"; DestDir: "{app}\"; Flags: recursesubdirs ignoreversion
; Stellarium's stuff
Expand Down Expand Up @@ -77,7 +77,7 @@ Name: "{group}\Stellarium"; Filename: "{app}\stellarium.exe"; WorkingDir: "{app}
#if "Qt5_@Qt5_FOUND@" == "Qt5_1"
Name: "{group}\Stellarium {cm:AngleMode}"; Filename: "{app}\stellarium.exe"; Parameters: "--angle-d3d9"; WorkingDir: "{app}"; IconFilename: "{app}\data\stellarium.ico"
Name: "{group}\Stellarium {cm:AngleD3D11Mode}"; Filename: "{app}\stellarium.exe"; Parameters: "--angle-d3d11"; WorkingDir: "{app}"; IconFilename: "{app}\data\stellarium.ico"
#else
#else
Name: "{group}\Stellarium {cm:SingleBuffer}"; Filename: "{app}\stellarium.exe"; Parameters: "--single-buffer"; WorkingDir: "{app}"; IconFilename: "{app}\data\stellarium.ico"
#endif
Name: "{group}\Stellarium {cm:MesaMode}"; Filename: "{app}\stellarium.exe"; Parameters: "--mesa-mode"; WorkingDir: "{app}"; IconFilename: "{app}\data\stellarium.ico"
Expand Down Expand Up @@ -121,35 +121,32 @@ Root: HKCR; Subkey: "Stellarium.Script\shell\open\command"; ValueType: string; V
; Recommended use Inno Setup 5.5.3+
[Languages]
; Official translations of GUI of Inno Setup + translation Stellarium specific lines
Name: "en"; MessagesFile: "compiler:Default.isl,@CMAKE_SOURCE_DIR@\util\ISL\EnglishCM.isl"
Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl,@CMAKE_SOURCE_DIR@\util\ISL\CatalanCM.isl"
Name: "en"; MessagesFile: "compiler:Default.isl,@PROJECT_SOURCE_DIR@\util\ISL\EnglishCM.isl"
Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl,@PROJECT_SOURCE_DIR@\util\ISL\CatalanCM.isl"
Name: "co"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl,@CMAKE_SOURCE_DIR@\util\ISL\FrenchCM.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl,@CMAKE_SOURCE_DIR@\util\ISL\GermanCM.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl,@PROJECT_SOURCE_DIR@\util\ISL\FrenchCM.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl,@PROJECT_SOURCE_DIR@\util\ISL\GermanCM.isl"
Name: "he"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl,@CMAKE_SOURCE_DIR@\util\ISL\NorwegianCM.isl"
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl,@PROJECT_SOURCE_DIR@\util\ISL\NorwegianCM.isl"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl,@CMAKE_SOURCE_DIR@\util\ISL\BrazilianPortugueseCM.isl"
Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl,@PROJECT_SOURCE_DIR@\util\ISL\BrazilianPortugueseCM.isl"
Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl,@CMAKE_SOURCE_DIR@\util\ISL\RussianCM.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl,@PROJECT_SOURCE_DIR@\util\ISL\RussianCM.isl"
Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "uk"; MessagesFile: "compiler:Languages\Ukrainian.isl,@CMAKE_SOURCE_DIR@\util\ISL\UkrainianCM.isl"
Name: "uk"; MessagesFile: "compiler:Languages\Ukrainian.isl,@PROJECT_SOURCE_DIR@\util\ISL\UkrainianCM.isl"
; Unofficial translations of GUI of Inno Setup
Name: "el"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\Greek.isl"
Name: "hu"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\Hungarian.isl"
Name: "sr"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\SerbianCyrillic.isl"
Name: "bg"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\Bulgarian.isl,@CMAKE_SOURCE_DIR@\util\ISL\BulgarianCM.isl"
Name: "bs"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\Bosnian.isl,@CMAKE_SOURCE_DIR@\util\ISL\BosnianCM.isl"
Name: "ko"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\Korean.isl,@CMAKE_SOURCE_DIR@\util\ISL\KoreanCM.isl"
Name: "zh_CN"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\ChineseSimplified.isl,@CMAKE_SOURCE_DIR@\util\ISL\ChineseSimplifiedCM.isl"
Name: "zh_TW"; MessagesFile: "@CMAKE_SOURCE_DIR@\util\ISL\ChineseTraditional.isl,@CMAKE_SOURCE_DIR@\util\ISL\ChineseTraditionalCM.isl"
Name: "el"; MessagesFile: "@PROJECT_SOURCE_DIR@\util\ISL\Greek.isl"
Name: "hu"; MessagesFile: "@PROJECT_SOURCE_DIR@\util\ISL\Hungarian.isl"
Name: "sr"; MessagesFile: "@PROJECT_SOURCE_DIR@\util\ISL\SerbianCyrillic.isl"
Name: "zh_CN"; MessagesFile: "@PROJECT_SOURCE_DIR@\util\ISL\ChineseSimplified.isl,@PROJECT_SOURCE_DIR@\util\ISL\ChineseSimplifiedCM.isl"
Name: "zh_TW"; MessagesFile: "@PROJECT_SOURCE_DIR@\util\ISL\ChineseTraditional.isl,@PROJECT_SOURCE_DIR@\util\ISL\ChineseTraditionalCM.isl"

[Code]
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
Expand Down
2 changes: 1 addition & 1 deletion cmake/stellarium.rc.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
stellarium-icon ICON "@CMAKE_SOURCE_DIR@/data/@[email protected]"
stellarium-icon ICON "@PROJECT_SOURCE_DIR@/data/@[email protected]"
1 VERSIONINFO
FILEVERSION @PACKAGE_VERSION_RC@
PRODUCTVERSION @PACKAGE_VERSION_RC@
Expand Down
22 changes: 17 additions & 5 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

########### install files ###############
INSTALL(FILES ssystem_major.ini ssystem_minor.ini ssystem_1000comets.ini
base_locations.bin.gz default_cfg.ini languages.tab iso3166.tab
base_locations.bin.gzip default_cfg.ini languages.tab iso3166.tab
regions-geoscheme.tab constellation_boundaries.dat constellations_spans.dat
nomenclature.dat DESTINATION ${SDATALOC}/data)
# install fonts
Expand All @@ -12,7 +12,6 @@ INSTALL(DIRECTORY shaders/ DESTINATION ${SDATALOC}/data/shaders FILES_MATCHING
PATTERN "planet*")

########### splash target ##############
ADD_CUSTOM_TARGET(splash ALL)
SET(_splashFile splash.png)
SET(_splashDstFile ${CMAKE_CURRENT_BINARY_DIR}/${_splashFile})

Expand All @@ -22,14 +21,21 @@ ELSE()
GET_FILENAME_COMPONENT(_splashSrcFile splash.png ABSOLUTE)
ENDIF()


ADD_CUSTOM_TARGET(splash ALL
DEPENDS ${_splashDstFile}
)

ADD_CUSTOM_COMMAND(
TARGET splash
OUTPUT ${_splashDstFile}
DEPENDS ${_splashSrcFile}
COMMAND ${CMAKE_COMMAND} -E copy ${_splashSrcFile} ${_splashDstFile}
)


SET_TARGET_PROPERTIES(splash PROPERTIES FOLDER "data")

########### icon target ###############
ADD_CUSTOM_TARGET(icon ALL)
IF(APPLE)
SET(_iconFile stellarium.icns)
IF(NOT STELLARIUM_RELEASE_BUILD)
Expand All @@ -47,8 +53,14 @@ ELSE()
ENDIF()

SET(_iconDstFile ${CMAKE_CURRENT_BINARY_DIR}/${_iconFile})

ADD_CUSTOM_TARGET(icon ALL
DEPENDS ${_iconDstFile}
)

ADD_CUSTOM_COMMAND(
TARGET icon
OUTPUT ${_iconDstFile}
DEPENDS ${_iconSrcFile}
COMMAND ${CMAKE_COMMAND} -E copy ${_iconSrcFile} ${_iconDstFile}
)
SET_TARGET_PROPERTIES(icon PROPERTIES FOLDER "data")
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions data/ssystem_major.ini
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ absolute_magnitude=12.89
albedo=0.08
color=1., 0.93, 0.832
coord_func=deimos_special
model=m2deimos.obj.gz
model=m2deimos.obj.gzip
name=Deimos
orbit_Period=1.263
parent=Mars
Expand Down Expand Up @@ -1456,7 +1456,7 @@ absolute_magnitude=11.8
albedo=0.07
color=1., 0.919, 0.806
coord_func=phobos_special
model=m1phobos.obj.gz
model=m1phobos.obj.gzip
name=Phobos
orbit_Period=0.319
parent=Mars
Expand Down
Loading