mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-05 20:39:59 -08:00
* Have CardDatabase::getPreferredPrintingInfo respect card provider ID overrides (pinned printings)
Took 13 minutes
Took 37 seconds
Took 10 seconds
Took 10 seconds
# Commit time for manual adjustment:
# Took 30 seconds
Took 15 seconds
Took 8 minutes
Took 21 seconds
* Move settings cache and settings card preference provider out of libcockatrice_settings and into cockatrice
Took 52 minutes
Took 9 minutes
Took 1 minute
* Temp cache.
Took 16 minutes
* Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer.
* Implement interfaces for settings that need it
Took 2 hours 38 minutes
* Adjust oracle.
Took 5 minutes
* Move abstract/noop interfaces to libcockatrice_interfaces so they can be linked against independently.
Took 52 minutes
* Clean up some links.
Took 3 minutes
* Cleanup two includes.
Took 3 minutes
* More fixes.
Took 7 minutes
* More includes that slipped past.
Took 3 minutes
* Stop mocking and start injecting for tests.
Took 15 minutes
* I don't know why remote_client was including main.
Took 4 minutes
* Include.
Took 3 minutes
* Lint.
Took 2 minutes
* Don't use Qt pointers.
Took 1 hour 7 minutes
* Make parser use CardSettingsInterface
Took 13 minutes
* Also adjust constructor lol.
Took 8 minutes
* Lint.
Took 32 minutes
* Revert "Lint."
This reverts commit ecb596c39e.
Took 3 minutes
* Test.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
134 lines
3.5 KiB
CMake
134 lines
3.5 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(Dbconverter VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
|
|
|
# ------------------------
|
|
# Sources
|
|
# ------------------------
|
|
set(dbconverter_SOURCES src/main.cpp src/mocks.cpp ${VERSION_STRING_CPP})
|
|
|
|
# ------------------------
|
|
# Qt configuration
|
|
# ------------------------
|
|
set(QT_DONT_USE_QTGUI TRUE)
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
# ------------------------
|
|
# Build executable
|
|
# ------------------------
|
|
add_executable(dbconverter MACOSX_BUNDLE ${dbconverter_SOURCES})
|
|
|
|
# ------------------------
|
|
# Link libraries
|
|
# ------------------------
|
|
target_link_libraries(
|
|
dbconverter
|
|
PRIVATE libcockatrice_card
|
|
PRIVATE libcockatrice_interfaces
|
|
PRIVATE libcockatrice_settings
|
|
PRIVATE ${DB_CONVERTER_QT_MODULES}
|
|
)
|
|
|
|
# ------------------------
|
|
# Install rules
|
|
# ------------------------
|
|
if(UNIX)
|
|
if(APPLE)
|
|
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
|
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}")
|
|
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}")
|
|
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
|
|
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
|
|
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
|
|
|
|
install(TARGETS dbconverter BUNDLE DESTINATION ./)
|
|
else()
|
|
# Linux
|
|
install(TARGETS dbconverter RUNTIME DESTINATION bin/)
|
|
endif()
|
|
elseif(WIN32)
|
|
install(TARGETS dbconverter RUNTIME DESTINATION ./)
|
|
endif()
|
|
|
|
# ------------------------
|
|
# Qt plugin handling
|
|
# ------------------------
|
|
if(APPLE)
|
|
set(plugin_dest_dir dbconverter.app/Contents/Plugins)
|
|
set(qtconf_dest_dir dbconverter.app/Contents/Resources)
|
|
|
|
install(
|
|
DIRECTORY "${QT_PLUGINS_DIR}/"
|
|
DESTINATION ${plugin_dest_dir}
|
|
COMPONENT Runtime
|
|
FILES_MATCHING
|
|
PATTERN "*.dSYM" EXCLUDE
|
|
PATTERN "*_debug.dylib" EXCLUDE
|
|
PATTERN "platforms/*.dylib"
|
|
)
|
|
|
|
install(
|
|
CODE "
|
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
|
Plugins = Plugins
|
|
Translations = Resources/translations\")
|
|
"
|
|
COMPONENT Runtime
|
|
)
|
|
|
|
install(
|
|
CODE "
|
|
file(GLOB_RECURSE QTPLUGINS
|
|
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*.dylib\")
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
include(BundleUtilities)
|
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/dbconverter.app\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR};${MYSQLCLIENT_LIBRARY_DIR}\")
|
|
"
|
|
COMPONENT Runtime
|
|
)
|
|
endif()
|
|
|
|
if(WIN32)
|
|
set(plugin_dest_dir Plugins)
|
|
set(qtconf_dest_dir .)
|
|
|
|
install(
|
|
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
|
|
DESTINATION ./
|
|
FILES_MATCHING
|
|
PATTERN "*.dll"
|
|
)
|
|
|
|
install(
|
|
DIRECTORY "${QT_PLUGINS_DIR}/"
|
|
DESTINATION ${plugin_dest_dir}
|
|
COMPONENT Runtime
|
|
FILES_MATCHING
|
|
PATTERN "platforms/qdirect2d.dll"
|
|
PATTERN "platforms/qminimal.dll"
|
|
PATTERN "platforms/qoffscreen.dll"
|
|
PATTERN "platforms/qwindows.dll"
|
|
)
|
|
|
|
install(
|
|
CODE "
|
|
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
|
|
Plugins = Plugins
|
|
Translations = Resources/translations\")
|
|
"
|
|
COMPONENT Runtime
|
|
)
|
|
|
|
install(
|
|
CODE "
|
|
file(GLOB_RECURSE QTPLUGINS
|
|
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*.dll\")
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
include(BundleUtilities)
|
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/dbconverter.exe\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
|
|
"
|
|
COMPONENT Runtime
|
|
)
|
|
endif()
|