Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
49b22b7d
Commit
49b22b7d
authored
Dec 27, 2015
by
Fabio Bas
Browse files
Try to fix package creation
parent
f03051b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
servatrice/CMakeLists.txt
View file @
49b22b7d
...
@@ -83,6 +83,28 @@ endif()
...
@@ -83,6 +83,28 @@ endif()
SET
(
QT_DONT_USE_QTGUI TRUE
)
SET
(
QT_DONT_USE_QTGUI TRUE
)
# Mysql connector
if
(
UNIX
)
if
(
APPLE
)
SET
(
MYSQLCLIENT_DEFAULT_PATHS
"/usr/local/lib"
"/opt/local/lib/mysql55/mysql/"
"/opt/local/lib/mysql56/mysql/"
)
else
()
SET
(
MYSQLCLIENT_DEFAULT_PATHS
"/usr/lib"
"/usr/local/lib"
)
endif
()
elseif
(
WIN32
)
SET
(
MYSQLCLIENT_DEFAULT_PATHS
"C:
\\
Program Files
\\
MySQL
\\
MySQL Server 5.5
\\
lib"
"C:
\\
Program Files
\\
MySQL
\\
MySQL Server 5.6
\\
lib"
)
endif
()
find_library
(
MYSQLCLIENT_LIBRARIES NAMES mysqlclient PATHS
${
MYSQLCLIENT_DEFAULT_PATHS
}
PATH_SUFFIXES mysql mariadb
)
if
(
${
MYSQLCLIENT_LIBRARIES
}
MATCHES
"NOTFOUND"
)
set
(
MYSQLCLIENT_FOUND FALSE CACHE INTERNAL
""
)
MESSAGE
(
STATUS
"Mysql connector NOT FOUND: servatrice won't be able to connect to a mysql server"
)
unset
(
MYSQLCLIENT_LIBRARIES
)
else
()
set
(
MYSQLCLIENT_FOUND TRUE CACHE INTERNAL
""
)
get_filename_component
(
MYSQLCLIENT_LIBRARY_DIR
${
MYSQLCLIENT_LIBRARIES
}
PATH
)
MESSAGE
(
STATUS
"Mysql connector found at:
${
MYSQLCLIENT_LIBRARY_DIR
}
"
)
endif
()
# Declare path variables
# Declare path variables
set
(
ICONDIR share/icons CACHE STRING
"icon dir"
)
set
(
ICONDIR share/icons CACHE STRING
"icon dir"
)
set
(
DESKTOPDIR share/applications CACHE STRING
"desktop file destination"
)
set
(
DESKTOPDIR share/applications CACHE STRING
"desktop file destination"
)
...
@@ -152,7 +174,7 @@ if(APPLE)
...
@@ -152,7 +174,7 @@ if(APPLE)
# qt5: platforms, sqldrivers
# qt5: platforms, sqldrivers
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|platforms|sqldrivers
)/.*
\\
.dylib"
FILES_MATCHING REGEX
"(codecs
/.*
|platforms
/.*
|sqldrivers
/libqsqlmysql)
\\
.dylib"
REGEX
".*_debug
\\
.dylib"
EXCLUDE
)
REGEX
".*_debug
\\
.dylib"
EXCLUDE
)
install
(
CODE
"
install
(
CODE
"
...
@@ -166,7 +188,7 @@ Translations = Resources/translations\")
...
@@ -166,7 +188,7 @@ Translations = Resources/translations\")
\"\$
{CMAKE_INSTALL_PREFIX}/
${
plugin_dest_dir
}
/*.dylib
\"
)
\"\$
{CMAKE_INSTALL_PREFIX}/
${
plugin_dest_dir
}
/*.dylib
\"
)
set(BU_CHMOD_BUNDLE_ITEMS ON)
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
include(BundleUtilities)
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/servatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/servatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
;
${
MYSQLCLIENT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
"
COMPONENT Runtime
)
endif
()
endif
()
...
@@ -179,7 +201,8 @@ if(WIN32)
...
@@ -179,7 +201,8 @@ if(WIN32)
# qt5: platforms, sqldrivers
# qt5: platforms, sqldrivers
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|platforms|sqldrivers)/.*[^d]
\\
.dll"
)
FILES_MATCHING REGEX
"(codecs/.*|platforms/.*|sqldrivers/libqsqlmysql)
\\
.dll"
REGEX
".*d
\\
.dll"
EXCLUDE
)
install
(
CODE
"
install
(
CODE
"
file(WRITE
\"\$
{CMAKE_INSTALL_PREFIX}/
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
file(WRITE
\"\$
{CMAKE_INSTALL_PREFIX}/
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
...
@@ -192,7 +215,7 @@ Translations = Resources/translations\")
...
@@ -192,7 +215,7 @@ Translations = Resources/translations\")
\"\$
{CMAKE_INSTALL_PREFIX}/
${
plugin_dest_dir
}
/*.dll
\"
)
\"\$
{CMAKE_INSTALL_PREFIX}/
${
plugin_dest_dir
}
/*.dll
\"
)
set(BU_CHMOD_BUNDLE_ITEMS ON)
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
include(BundleUtilities)
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/servatrice.exe
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
fixup_bundle(
\"\$
{CMAKE_INSTALL_PREFIX}/servatrice.exe
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
;
${
MYSQLCLIENT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
"
COMPONENT Runtime
)
endif
()
endif
()
#Compile a portable version, default off
#Compile a portable version, default off
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment