Skip to content

Commit

Permalink
improve CMakeLists.txt for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-w committed Jun 21, 2014
1 parent c62a3de commit 8d38a68
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ IF(NOT WIN32)
FIND_PACKAGE(ZLIB)
ELSE()
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/external/zlib)
SET(ZLIB "; zlib already included in source code")
ENDIF()

FIND_PACKAGE(Qt5Test)
Expand Down Expand Up @@ -322,6 +323,7 @@ IF(WIN32)
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x86.exe\"; Parameters: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"{cm:RedistRun}\"")
ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.dll\"; 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 MinGW")
ENDIF()
ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET(ISS_ARCHITECTURE_SPECIFIC ";Make the installer run only on win64:\nArchitecturesAllowed=x64\n;Switch to 64-bit install mode:\nArchitecturesInstallIn64BitMode=x64")
Expand All @@ -332,6 +334,7 @@ IF(WIN32)
SET(REDIST_RUN "Filename: \"{tmp}/vcredist_x64.exe\"; Parameters: \"/passive /Q:a /c:\"\"msiexec /qb /i vcredist.msi\"\" \"; StatusMsg: \"{cm:RedistRun}\"")
ELSE()
SET(REDIST_FILES "Source: \"${MINGW_BIN_DIRECTORY}/libstdc++*.dll\"; 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 MinGW")
ENDIF()
ENDIF()
SET(ISS_AUTOGENERATED_WARNING "Do not edit this file! It has been automatically generated by CMake. Your changes will be lost the next time CMake is run.")
Expand Down Expand Up @@ -375,7 +378,7 @@ IF(WIN32)
SET(ISS_QML_DIR "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmldir\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_PLUGINS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/plugins.qmltypes\"; DestDir: \"{app}/Qt/labs/shaders/\";")
SET(ISS_QML_SHADERS "Source: \"${QT5_LIBS}/../imports/Qt/labs/shaders/qmlshadersplugin.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-patch.iss.cmake ${CMAKE_SOURCE_DIR}/stellarium-patch.iss @ONLY)
ENDIF()
Expand Down
18 changes: 10 additions & 8 deletions po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@

ADD_CUSTOM_TARGET(translations)

# These packages are now used only to generate .pot and .po files
FIND_PACKAGE(Gettext)
FIND_PACKAGE(XGettext)
IF(NOT MSVC)
# These packages are now used only to generate .pot and .po files
FIND_PACKAGE(Gettext)
FIND_PACKAGE(XGettext)

IF(${XGETTEXT_FOUND})
ADD_CUSTOM_TARGET(generate-pot)
ENDIF()
IF(${XGETTEXT_FOUND})
ADD_CUSTOM_TARGET(generate-pot)
ENDIF()

IF(${GETTEXT_FOUND})
ADD_CUSTOM_TARGET(update-po)
IF(${GETTEXT_FOUND})
ADD_CUSTOM_TARGET(update-po)
ENDIF()
ENDIF()

FIND_PACKAGE(Qt5LinguistTools REQUIRED)
Expand Down

0 comments on commit 8d38a68

Please sign in to comment.