Skip to content

Commit dbc9151

Browse files
committed
Fixed install paths for Debian/Ubuntu.
1 parent 9799914 commit dbc9151

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

CMakeLists.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,18 @@ if (NOT ("${QSQLCIPHER_COPYTO_DIR}" STREQUAL ""))
111111
add_custom_command(TARGET qsqlcipher POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:qsqlcipher> ${QSQLCIPHER_COPYTO_DIR}/$<TARGET_FILE_NAME:qsqlcipher>)
112112
endif()
113113

114+
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
114115
if (NOT WIN32)
115-
INSTALL(TARGETS qsqlcipher DESTINATION lib/qt5/plugins/sqldrivers)
116+
if (DPKG_PROGRAM)
117+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
118+
INSTALL(TARGETS qsqlcipher DESTINATION lib/x86_64-linux-gnu/qt5/plugins/sqldrivers)
119+
else()
120+
INSTALL(TARGETS qsqlcipher DESTINATION lib/i386-linux-gnu/qt5/plugins/sqldrivers)
121+
endif()
122+
else()
123+
message(WARNING "Packaging is not set up for this platform, either submit a ticket or change/add pathes yourself, if packaging is required.")
124+
INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)
125+
endif()
116126
else()
117127
INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)
118128
endif()
@@ -128,11 +138,10 @@ SET(CPACK_PACKAGE_CONTACT "[email protected]")
128138

129139
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
130140
SET(CPACK_PACKAGE_VERSION_MINOR "1")
131-
SET(CPACK_PACKAGE_VERSION_PATCH "0")
132-
SET(CPACK_PACKAGE_VERSION_REVISION "5")
141+
SET(CPACK_PACKAGE_VERSION_PATCH "1")
142+
SET(CPACK_PACKAGE_VERSION_REVISION "1")
133143
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
134144

135-
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
136145
if (DPKG_PROGRAM)
137146
execute_process(COMMAND ${DPKG_PROGRAM} --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
138147
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_VERSION_REVISION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

0 commit comments

Comments
 (0)