Commit 952eac8b authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

Fix Windows build.

QT_STRICT_ITERATORS do not work on vs compilers.
Missing ZLib includes for osm runner plugin.
parent 7bfdcedb
......@@ -209,11 +209,11 @@ else() # Linux / bsd etc...
endif()
if(NOT ICON_INSTALL_DIR)
set(ICON_INSTALL_DIR ${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons)
set(ICON_INSTALL_DIR share/icons)
endif(NOT ICON_INSTALL_DIR)
if(NOT APPS_INSTALL_DIR)
set(APPS_INSTALL_DIR ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
set(APPS_INSTALL_DIR share/applications)
endif(NOT APPS_INSTALL_DIR)
if(NOT INCLUDE_INSTALL_DIR)
......@@ -248,10 +248,15 @@ add_definitions(
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_STRICT_ITERATORS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050700
)
if (NOT WIN32)
# Strict iterators can't be used on Windows, they lead to a link error
# when application code iterates over a QVector<QPoint> for instance
# See example at https://bugreports.qt.io/browse/QTBUG-78112
add_definitions(-DQT_STRICT_ITERATORS)
endif()
####################################################
# Options for static build
if(STATIC_BUILD)
......
......@@ -48,7 +48,7 @@ if(STATIC_BUILD)
endif(STATIC_BUILD)
if(WIN32)
install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
install (TARGETS marble-qt RUNTIME DESTINATION .)
else(WIN32)
if (APPLE)
# No need for this when installing to a bundle
......@@ -56,6 +56,7 @@ else (APPLE)
install (TARGETS marble-qt RUNTIME DESTINATION bin )
endif (APPLE)
endif(WIN32)
if(APPS_INSTALL_DIR)
install(PROGRAMS org.kde.marble-qt.desktop DESTINATION ${APPS_INSTALL_DIR})
endif(APPS_INSTALL_DIR)
......@@ -50,7 +50,7 @@ target_include_directories(astro
# choose the correct target install library path
if(WIN32)
INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib)
INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION . ARCHIVE DESTINATION lib)
elseif(APPLE)
INSTALL(TARGETS astro LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib)
else()
......
......@@ -448,7 +448,7 @@ target_include_directories(marblewidget
# choose the correct target install library path
if(WIN32)
install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib)
install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION . ARCHIVE DESTINATION lib)
elseif(APPLE)
install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib)
else()
......
......@@ -53,7 +53,7 @@ if(Qt5Positioning_FOUND)
endif()
if(WIN32)
install(TARGETS marbledeclarative RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib)
install(TARGETS marbledeclarative RUNTIME DESTINATION . ARCHIVE DESTINATION lib)
else()
install(TARGETS marbledeclarative LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
......@@ -6,6 +6,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/writers
${CMAKE_CURRENT_SOURCE_DIR}/translators
${CMAKE_CURRENT_BINARY_DIR}
${ZLIB_INCLUDE_DIRS}
)
set( osm_writers_SRCS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment