Fleshing out windows(MINGW) install.
This commit is contained in:
+19
-3
@@ -21,9 +21,13 @@ set (Full_Version "${Major_Version}.${Minor_Version}.${Micro_Version}")
|
||||
#=======================================
|
||||
# Dependencies
|
||||
#=======================================
|
||||
if (WIN32)
|
||||
# Make sure we can find MINGW libraries, e.g. zlib
|
||||
set (CMAKE_PREFIX_PATH C:/MinGW )
|
||||
if (MINGW)
|
||||
# Locate MINGW directories
|
||||
string (REPLACE "/g++.exe" "" MINGW_BIN_DIR ${CMAKE_CXX_COMPILER})
|
||||
string (REPLACE "/bin" "" MINGW_BASE_DIR ${MINGW_BIN_DIR})
|
||||
|
||||
# Make sure we can find MINGW libraries, e.g. zlib
|
||||
set (CMAKE_PREFIX_PATH ${MINGW_BASE_DIR} )
|
||||
endif ()
|
||||
|
||||
find_package(Qt5Widgets 5.4 REQUIRED)
|
||||
@@ -31,6 +35,12 @@ find_package(Qt5PrintSupport 5.4 REQUIRED)
|
||||
find_package(Qt5Xml 5.4 REQUIRED)
|
||||
find_package(Qt5Svg 5.4 REQUIRED)
|
||||
|
||||
if (MINGW)
|
||||
# Locate Qt directories
|
||||
execute_process (COMMAND qtpaths --install-prefix OUTPUT_VARIABLE QT_BASE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set (QT_BIN_DIR ${QT_BASE_DIR}/bin)
|
||||
endif ()
|
||||
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
|
||||
|
||||
@@ -53,6 +63,12 @@ message (STATUS "Source code location .... " ${glabels_SOURCE_DIR})
|
||||
message (STATUS "C++ Compiler ............ " ${CMAKE_CXX_COMPILER_ID} " " ${CMAKE_CXX_COMPILER} " " ${CMAKE_CXX_COMPILER_VERSION})
|
||||
message (STATUS "Qt version .............. " ${Qt5Core_VERSION})
|
||||
message (STATUS "zlib version ............ " ${ZLIB_VERSION_STRING})
|
||||
|
||||
if (MINGW)
|
||||
message (STATUS "MinGW location .......... " ${MINGW_BASE_DIR})
|
||||
message (STATUS "MinGW Qt location ....... " ${QT_BASE_DIR})
|
||||
endif ()
|
||||
|
||||
message (STATUS "")
|
||||
|
||||
#
|
||||
|
||||
+19
-3
@@ -5,7 +5,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
add_compile_options (-std=c++11 -g)
|
||||
if (NOT WIN32)
|
||||
add_compile_options (-fPIC)
|
||||
add_compile_options (-fPIC)
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -161,8 +161,7 @@ if (WIN32)
|
||||
set (glabels_win_rc glabels.rc)
|
||||
endif ()
|
||||
|
||||
|
||||
add_executable (glabels-qt
|
||||
add_executable (glabels-qt WIN32
|
||||
${glabels_sources}
|
||||
${glabels_moc_sources}
|
||||
${glabels_qrc_sources}
|
||||
@@ -214,3 +213,20 @@ install (FILES icons/scalable/mimetypes/x-glabels-project.svg DESTINATION share/
|
||||
install (FILES icons/16x16/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/16x16/mimetypes)
|
||||
install (FILES icons/22x22/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/22x22/mimetypes)
|
||||
install (FILES icons/24x24/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/24x24/mimetypes)
|
||||
|
||||
if (MINGW)
|
||||
# Install supporting DLLs
|
||||
install (FILES
|
||||
${MINGW_BIN_DIR}/libgcc_s_dw2-1.dll
|
||||
${MINGW_BIN_DIR}/libstdc++-6.dll
|
||||
${MINGW_BIN_DIR}/zlib1.dll
|
||||
${QT_BIN_DIR}/libwinpthread-1.dll
|
||||
${QT_BIN_DIR}/Qt5Core.dll
|
||||
${QT_BIN_DIR}/Qt5Gui.dll
|
||||
${QT_BIN_DIR}/Qt5PrintSupport.dll
|
||||
${QT_BIN_DIR}/Qt5Widgets.dll
|
||||
${QT_BIN_DIR}/Qt5Svg.dll
|
||||
${QT_BIN_DIR}/Qt5Xml.dll
|
||||
DESTINATION bin
|
||||
)
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user