Skip to content
Snippets Groups Projects
Commit 69dc5352 authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

fix install part

parent 7b072d95
Branches
Tags
No related merge requests found
...@@ -223,12 +223,6 @@ ENDIF (WIN32) ...@@ -223,12 +223,6 @@ ENDIF (WIN32)
#--------------- here comes QT. Version problem (4 or 5?) #--------------- here comes QT. Version problem (4 or 5?)
# cmake does not provide findqt5-modules # cmake does not provide findqt5-modules
#message(STATUS "QT_Qmake_executable " ${QT_QMAKE_EXECUTABLE}) #message(STATUS "QT_Qmake_executable " ${QT_QMAKE_EXECUTABLE})
if($QT_QMAKE_EXECUTABLE STREQUAL "")
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake)
if (NOT QT_QMAKE_EXECUTABL)
message(WARNING "Check Qt ... no")
endif()
endif()
# default qt version is 4 # default qt version is 4
if("${DESIRED_QT_VERSION}" STREQUAL "") if("${DESIRED_QT_VERSION}" STREQUAL "")
set(DESIRED_QT_VERSION "5") set(DESIRED_QT_VERSION "5")
...@@ -401,7 +395,7 @@ add_definitions("-DUSED_COMPILER=\"${USED_COMPILER}\"") ...@@ -401,7 +395,7 @@ add_definitions("-DUSED_COMPILER=\"${USED_COMPILER}\"")
# Install the QtTest application, on Apple, the bundle is at the root of the # Install the QtTest application, on Apple, the bundle is at the root of the
# install tree, and on other platforms it'll go into the bin directory. # install tree, and on other platforms it'll go into the bin directory.
INSTALL(TARGETS jpsvis INSTALL(TARGETS jpsvis
BUNDLE DESTINATION . COMPONENT Runtime BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime
) )
...@@ -409,14 +403,14 @@ INSTALL(TARGETS jpsvis ...@@ -409,14 +403,14 @@ INSTALL(TARGETS jpsvis
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------
# Install needed Qt plugins by copying directories from the qt installation # Install needed Qt plugins by copying directories from the qt installation
# One can cull what gets copied by using 'REGEX "..." EXCLUDE' # One can cull what gets copied by using 'REGEX "..." EXCLUDE'
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime) #INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime)
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------
# install a qt.conf file # install a qt.conf file
# this inserts some cmake code into the install script to write the file # this inserts some cmake code into the install script to write the file
INSTALL(CODE " # INSTALL(CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"\") # file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"\")
" COMPONENT Runtime) # " COMPONENT Runtime)
#-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------
...@@ -437,14 +431,14 @@ message(STATUS "qt_lib_dirs ${QT_LIBRARY_DIRS}") ...@@ -437,14 +431,14 @@ message(STATUS "qt_lib_dirs ${QT_LIBRARY_DIRS}")
# An alternative is the do a configure_file() on a script and use install(SCRIPT ...). # An alternative is the do a configure_file() on a script and use install(SCRIPT ...).
# Note that the image plugins depend on QtSvg and QtXml, and it got those copied # Note that the image plugins depend on QtSvg and QtXml, and it got those copied
# over. # over.
if(APPLE) #if(APPLE)
INSTALL(CODE " # INSTALL(CODE "
file(GLOB_RECURSE QTPLUGINS # file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") # \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
include(BundleUtilities) # include(BundleUtilities)
fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\") # fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime) # " COMPONENT Runtime)
endif() # endif()
IF(APPLE) IF(APPLE)
# set how it shows up in the Info.plist file # set how it shows up in the Info.plist file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment