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
721cf6fe
Commit
721cf6fe
authored
Jun 11, 2014
by
Fabio Bas
Browse files
Re-indent CMakeLists.txt using spaces
parent
ed0311d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
721cf6fe
...
...
@@ -12,24 +12,24 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# Define a proper install path
if
(
UNIX
)
if
(
APPLE
)
# MacOS X
# Due to the special bundle structure ignore
# the prefix eventually set by the user.
set
(
CMAKE_INSTALL_PREFIX
${
CMAKE_BINARY_DIR
}
/release
)
else
()
# Linux / BSD
if
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
)
#fix package build
if
(
PREFIX
)
set
(
CMAKE_INSTALL_PREFIX
${
PREFIX
}
)
else
()
set
(
CMAKE_INSTALL_PREFIX /usr/local
)
endif
()
endif
()
endif
()
if
(
APPLE
)
# MacOS X
# Due to the special bundle structure ignore
# the prefix eventually set by the user.
set
(
CMAKE_INSTALL_PREFIX
${
CMAKE_BINARY_DIR
}
/release
)
else
()
# Linux / BSD
if
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
)
#fix package build
if
(
PREFIX
)
set
(
CMAKE_INSTALL_PREFIX
${
PREFIX
}
)
else
()
set
(
CMAKE_INSTALL_PREFIX /usr/local
)
endif
()
endif
()
endif
()
elseif
(
WIN32
)
set
(
CMAKE_INSTALL_PREFIX
${
CMAKE_BINARY_DIR
}
/release
)
set
(
CMAKE_INSTALL_PREFIX
${
CMAKE_BINARY_DIR
}
/release
)
endif
()
# Force "Release" build type by default
...
...
@@ -37,18 +37,18 @@ set(CMAKE_BUILD_TYPE Release)
# Define proper compilation flags
IF
(
CMAKE_COMPILER_IS_GNUCC
)
# linux/gcc, bsd/gcc, windows/mingw
set
(
CMAKE_CXX_FLAGS_RELEASE
"-s -O2"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-ggdb -O0"
)
# linux/gcc, bsd/gcc, windows/mingw
set
(
CMAKE_CXX_FLAGS_RELEASE
"-s -O2"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-ggdb -O0"
)
else
()
# other: osx/llvm, bsd/llvm
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O2"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O0"
)
# other: osx/llvm, bsd/llvm
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O2"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O0"
)
ENDIF
(
CMAKE_COMPILER_IS_GNUCC
)
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
IF
(
CMAKE_CXX_COMPILER_ID MATCHES
"GNU|Clang"
)
ADD_DEFINITIONS
(
"-DSFMT_MEXP=19937"
)
ADD_DEFINITIONS
(
"-DSFMT_MEXP=19937"
)
ENDIF
()
#Find Qt4 and enable the needed features
...
...
@@ -62,18 +62,18 @@ FIND_PACKAGE(Protobuf REQUIRED)
# Compile servatrice (default off)
add_subdirectory
(
common
)
if
(
WITH_SERVER
)
add_subdirectory
(
servatrice
)
add_subdirectory
(
servatrice
)
endif
(
WITH_SERVER
)
# Compile cockatrice+oracle (default on)
if
(
NOT WITHOUT_CLIENT
)
add_subdirectory
(
cockatrice
)
add_subdirectory
(
oracle
)
add_subdirectory
(
sounds
)
add_subdirectory
(
zonebg
)
add_subdirectory
(
cockatrice
)
add_subdirectory
(
oracle
)
add_subdirectory
(
sounds
)
add_subdirectory
(
zonebg
)
endif
(
NOT WITHOUT_CLIENT
)
# Compile testclient (default off)
if
(
WITH_TESTCLIENT
)
add_subdirectory
(
testclient
)
add_subdirectory
(
testclient
)
endif
(
WITH_TESTCLIENT
)
cockatrice/CMakeLists.txt
View file @
721cf6fe
...
...
@@ -5,128 +5,128 @@
PROJECT
(
cockatrice
)
SET
(
cockatrice_SOURCES
src/abstractcounter.cpp
src/counter_general.cpp
src/dlg_creategame.cpp
src/dlg_filter_games.cpp
src/dlg_connect.cpp
src/dlg_create_token.cpp
src/dlg_edit_tokens.cpp
src/abstractclient.cpp
src/remoteclient.cpp
src/main.cpp
src/window_main.cpp
src/gamesmodel.cpp
src/player.cpp
src/playertarget.cpp
src/cardzone.cpp
src/selectzone.cpp
src/cardlist.cpp
src/abstractcarditem.cpp
src/carditem.cpp
src/tablezone.cpp
src/handzone.cpp
src/handcounter.cpp
src/carddatabase.cpp
src/keysignals.cpp
src/gameview.cpp
src/gameselector.cpp
src/decklistmodel.cpp
src/deck_loader.cpp
src/dlg_load_deck_from_clipboard.cpp
src/dlg_load_remote_deck.cpp
src/cardinfowidget.cpp
src/cardframe.cpp
src/cardinfopicture.cpp
src/cardinfotext.cpp
src/filterbuilder.cpp
src/cardfilter.cpp
src/filtertreemodel.cpp
src/filtertree.cpp
src/messagelogwidget.cpp
src/zoneviewzone.cpp
src/zoneviewwidget.cpp
src/pilezone.cpp
src/stackzone.cpp
src/carddragitem.cpp
src/carddatabasemodel.cpp
src/setsmodel.cpp
src/window_sets.cpp
src/abstractgraphicsitem.cpp
src/abstractcarddragitem.cpp
src/dlg_settings.cpp
src/dlg_cardsearch.cpp
src/phasestoolbar.cpp
src/gamescene.cpp
src/arrowitem.cpp
src/arrowtarget.cpp
src/tab.cpp
src/tab_server.cpp
src/tab_room.cpp
src/tab_message.cpp
src/tab_game.cpp
src/tab_deck_storage.cpp
src/tab_replays.cpp
src/tab_supervisor.cpp
src/tab_admin.cpp
src/tab_userlists.cpp
src/tab_deck_editor.cpp
src/replay_timeline_widget.cpp
src/deckstats_interface.cpp
src/chatview.cpp
src/userlist.cpp
src/userinfobox.cpp
src/user_context_menu.cpp
src/remotedecklist_treewidget.cpp
src/remotereplaylist_treewidget.cpp
src/deckview.cpp
src/playerlistwidget.cpp
src/pixmapgenerator.cpp
src/settingscache.cpp
src/localserver.cpp
src/localserverinterface.cpp
src/localclient.cpp
src/priceupdater.cpp
src/qt-json/json.cpp
src/soundengine.cpp
src/pending_command.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
src/abstractcounter.cpp
src/counter_general.cpp
src/dlg_creategame.cpp
src/dlg_filter_games.cpp
src/dlg_connect.cpp
src/dlg_create_token.cpp
src/dlg_edit_tokens.cpp
src/abstractclient.cpp
src/remoteclient.cpp
src/main.cpp
src/window_main.cpp
src/gamesmodel.cpp
src/player.cpp
src/playertarget.cpp
src/cardzone.cpp
src/selectzone.cpp
src/cardlist.cpp
src/abstractcarditem.cpp
src/carditem.cpp
src/tablezone.cpp
src/handzone.cpp
src/handcounter.cpp
src/carddatabase.cpp
src/keysignals.cpp
src/gameview.cpp
src/gameselector.cpp
src/decklistmodel.cpp
src/deck_loader.cpp
src/dlg_load_deck_from_clipboard.cpp
src/dlg_load_remote_deck.cpp
src/cardinfowidget.cpp
src/cardframe.cpp
src/cardinfopicture.cpp
src/cardinfotext.cpp
src/filterbuilder.cpp
src/cardfilter.cpp
src/filtertreemodel.cpp
src/filtertree.cpp
src/messagelogwidget.cpp
src/zoneviewzone.cpp
src/zoneviewwidget.cpp
src/pilezone.cpp
src/stackzone.cpp
src/carddragitem.cpp
src/carddatabasemodel.cpp
src/setsmodel.cpp
src/window_sets.cpp
src/abstractgraphicsitem.cpp
src/abstractcarddragitem.cpp
src/dlg_settings.cpp
src/dlg_cardsearch.cpp
src/phasestoolbar.cpp
src/gamescene.cpp
src/arrowitem.cpp
src/arrowtarget.cpp
src/tab.cpp
src/tab_server.cpp
src/tab_room.cpp
src/tab_message.cpp
src/tab_game.cpp
src/tab_deck_storage.cpp
src/tab_replays.cpp
src/tab_supervisor.cpp
src/tab_admin.cpp
src/tab_userlists.cpp
src/tab_deck_editor.cpp
src/replay_timeline_widget.cpp
src/deckstats_interface.cpp
src/chatview.cpp
src/userlist.cpp
src/userinfobox.cpp
src/user_context_menu.cpp
src/remotedecklist_treewidget.cpp
src/remotereplaylist_treewidget.cpp
src/deckview.cpp
src/playerlistwidget.cpp
src/pixmapgenerator.cpp
src/settingscache.cpp
src/localserver.cpp
src/localserverinterface.cpp
src/localclient.cpp
src/priceupdater.cpp
src/qt-json/json.cpp
src/soundengine.cpp
src/pending_command.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
)
if
(
UNIX AND NOT APPLE
)
set_source_files_properties
(
src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"
${
CMAKE_INSTALL_PREFIX
}
/share/cockatrice/translations\\"
)
set_source_files_properties
(
src/main.cpp PROPERTIES COMPILE_FLAGS -DTRANSLATION_PATH=\\"
${
CMAKE_INSTALL_PREFIX
}
/share/cockatrice/translations\\"
)
endif
(
UNIX AND NOT APPLE
)
set
(
cockatrice_RESOURCES cockatrice.qrc
)
set
(
cockatrice_TS
#
translations/cockatrice_cs.ts
translations/cockatrice_de.ts
translations/cockatrice_en.ts
translations/cockatrice_es.ts
#
translations/cockatrice_fr.ts
translations/cockatrice_it.ts
translations/cockatrice_ja.ts
#
translations/cockatrice_pl.ts
#
translations/cockatrice_pt-br.ts
translations/cockatrice_pt.ts
#
translations/cockatrice_ru.ts
#
translations/cockatrice_sk.ts
translations/cockatrice_sv.ts
#
translations/cockatrice_zh_CN.ts
# translations/cockatrice_cs.ts
translations/cockatrice_de.ts
translations/cockatrice_en.ts
translations/cockatrice_es.ts
# translations/cockatrice_fr.ts
translations/cockatrice_it.ts
translations/cockatrice_ja.ts
# translations/cockatrice_pl.ts
# translations/cockatrice_pt-br.ts
translations/cockatrice_pt.ts
# translations/cockatrice_ru.ts
# translations/cockatrice_sk.ts
translations/cockatrice_sv.ts
#
translations/cockatrice_zh_CN.ts
)
if
(
WIN32
)
set
(
cockatrice_SOURCES
${
cockatrice_SOURCES
}
cockatrice.rc
)
set
(
cockatrice_SOURCES
${
cockatrice_SOURCES
}
cockatrice.rc
)
endif
(
WIN32
)
if
(
APPLE
)
set
(
MACOSX_BUNDLE_ICON_FILE appicon.icns
)
set_source_files_properties
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/appicon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set
(
cockatrice_SOURCES
${
cockatrice_SOURCES
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/appicon.icns
)
set
(
MACOSX_BUNDLE_ICON_FILE appicon.icns
)
set_source_files_properties
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/appicon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set
(
cockatrice_SOURCES
${
cockatrice_SOURCES
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/appicon.icns
)
ENDIF
(
APPLE
)
if
(
NOT QT_QTMULTIMEDIA_FOUND
)
FIND_PACKAGE
(
QtMobility REQUIRED
)
FIND_PACKAGE
(
QtMobility REQUIRED
)
endif
(
NOT QT_QTMULTIMEDIA_FOUND
)
SET
(
QT_USE_QTNETWORK TRUE
)
...
...
@@ -158,53 +158,53 @@ TARGET_LINK_LIBRARIES(cockatrice cockatrice_common ${QT_LIBRARIES} ${QT_MOBILITY
if
(
UNIX
)
if
(
APPLE
)
INSTALL
(
TARGETS cockatrice BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS cockatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
if
(
APPLE
)
INSTALL
(
TARGETS cockatrice BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS cockatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
elseif
(
WIN32
)
INSTALL
(
TARGETS cockatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
INSTALL
(
TARGETS cockatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
endif
()
if
(
NOT WIN32 AND NOT APPLE
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/cockatrice.png DESTINATION
${
ICONDIR
}
/hicolor/48x48/apps
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/cockatrice.svg DESTINATION
${
ICONDIR
}
/hicolor/scalable/apps
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/cockatrice.desktop DESTINATION
${
DESKTOPDIR
}
)
INSTALL
(
FILES
${
cockatrice_QM
}
DESTINATION share/cockatrice/translations
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/cockatrice.png DESTINATION
${
ICONDIR
}
/hicolor/48x48/apps
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/resources/cockatrice.svg DESTINATION
${
ICONDIR
}
/hicolor/scalable/apps
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/cockatrice.desktop DESTINATION
${
DESKTOPDIR
}
)
INSTALL
(
FILES
${
cockatrice_QM
}
DESTINATION share/cockatrice/translations
)
ENDIF
(
NOT WIN32 AND NOT APPLE
)
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.h
COMMAND
${
CMAKE_COMMAND
}
-DSOURCE_DIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/../common/getversion.cmake
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.h
COMMAND
${
CMAKE_COMMAND
}
-DSOURCE_DIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/../common/getversion.cmake
)
if
(
APPLE
)
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app/Contents/Resources
)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app/Contents/Resources
)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
Plugins = Plugins
\"
)
"
COMPONENT Runtime
)
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
\"
${
plugin_dest_dir
}
/*.dylib
\"
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
"
COMPONENT Runtime
)
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
\"
${
plugin_dest_dir
}
/*.dylib
\"
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/cockatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
endif
()
common/CMakeLists.txt
View file @
721cf6fe
...
...
@@ -6,26 +6,26 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
add_subdirectory
(
pb
)
SET
(
common_SOURCES
decklist.cpp
get_pb_extension.cpp
rng_abstract.cpp
rng_sfmt.cpp
server.cpp
server_abstractuserinterface.cpp
server_arrow.cpp
server_arrowtarget.h
server_card.cpp
server_cardzone.cpp
server_counter.cpp
server_game.cpp
server_database_interface.cpp
server_player.cpp
server_protocolhandler.cpp
server_remoteuserinterface.cpp
server_response_containers.cpp
server_room.cpp
serverinfo_user_container.cpp
sfmt/SFMT.c
decklist.cpp
get_pb_extension.cpp
rng_abstract.cpp
rng_sfmt.cpp
server.cpp
server_abstractuserinterface.cpp
server_arrow.cpp
server_arrowtarget.h
server_card.cpp
server_cardzone.cpp
server_counter.cpp
server_game.cpp
server_database_interface.cpp
server_player.cpp
server_protocolhandler.cpp
server_remoteuserinterface.cpp
server_response_containers.cpp
server_room.cpp
serverinfo_user_container.cpp
sfmt/SFMT.c
)
INCLUDE
(
${
QT_USE_FILE
}
)
...
...
common/pb/CMakeLists.txt
View file @
721cf6fe
...
...
@@ -5,147 +5,147 @@
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
SET
(
PROTO_FILES
admin_commands.proto
card_attributes.proto
color.proto
command_attach_card.proto
command_change_zone_properties.proto
command_concede.proto
command_create_arrow.proto
command_create_counter.proto
command_create_token.proto
command_deck_del_dir.proto
command_deck_del.proto
command_deck_download.proto
command_deck_list.proto
command_deck_new_dir.proto
command_deck_select.proto
command_deck_upload.proto
command_del_counter.proto
command_delete_arrow.proto
command_draw_cards.proto
command_dump_zone.proto
command_flip_card.proto
command_game_say.proto
command_inc_card_counter.proto
command_inc_counter.proto
command_kick_from_game.proto
command_leave_game.proto
command_move_card.proto
command_mulligan.proto
command_next_turn.proto
command_ready_start.proto
command_replay_delete_match.proto
command_replay_list.proto
command_replay_download.proto
command_replay_modify_match.proto
command_reveal_cards.proto
command_roll_die.proto
command_set_active_phase.proto
command_set_card_attr.proto
command_set_card_counter.proto
command_set_counter.proto
command_set_sideboard_plan.proto
command_set_sideboard_lock.proto
command_shuffle.proto
commands.proto
command_stop_dump_zone.proto
command_undo_draw.proto
context_concede.proto
context_connection_state_changed.proto
context_deck_select.proto
context_move_card.proto
context_mulligan.proto
context_ping_changed.proto
context_ready_start.proto
context_set_sideboard_lock.proto
context_undo_draw.proto
event_add_to_list.proto
event_attach_card.proto
event_change_zone_properties.proto
event_connection_closed.proto
event_create_arrow.proto
event_create_counter.proto
event_create_token.proto
event_del_counter.proto
event_delete_arrow.proto
event_destroy_card.proto
event_draw_cards.proto
event_dump_zone.proto
event_flip_card.proto
event_game_closed.proto
event_game_host_changed.proto
event_game_joined.proto
event_game_say.proto
event_game_state_changed.proto
event_join.proto
event_join_room.proto
event_kicked.proto
event_leave.proto
event_leave_room.proto
event_list_games.proto
event_list_rooms.proto
event_move_card.proto
event_player_properties_changed.proto
event_remove_from_list.proto
event_replay_added.proto
event_reveal_cards.proto
event_roll_die.proto
event_room_say.proto
event_server_complete_list.proto
event_server_identification.proto
event_server_message.proto
event_server_shutdown.proto
event_set_active_phase.proto
event_set_active_player.proto
event_set_card_attr.proto
event_set_card_counter.proto
event_set_counter.proto
event_shuffle.proto
event_stop_dump_zone.proto
event_user_joined.proto
event_user_left.proto
event_user_message.proto
game_commands.proto
game_event_container.proto
game_event_context.proto
game_event.proto
game_replay.proto
isl_message.proto
moderator_commands.proto
move_card_to_zone.proto
response_deck_download.proto
response_deck_list.proto
response_deck_upload.proto
response_dump_zone.proto
response_get_games_of_user.proto
response_get_user_info.proto
response_join_room.proto
response_list_users.proto
response_login.proto
response_replay_download.proto
response_replay_list.proto
response.proto
room_commands.proto
room_event.proto
serverinfo_arrow.proto
serverinfo_cardcounter.proto
serverinfo_card.proto
serverinfo_counter.proto
serverinfo_deckstorage.proto
serverinfo_game.proto
serverinfo_gametype.proto
serverinfo_playerping.proto
serverinfo_playerproperties.proto
serverinfo_player.proto
serverinfo_replay.proto
serverinfo_replay_match.proto
serverinfo_room.proto
serverinfo_user.proto
serverinfo_zone.proto
server_message.proto
session_commands.proto
session_event.proto
admin_commands.proto
card_attributes.proto
color.proto
command_attach_card.proto
command_change_zone_properties.proto
command_concede.proto
command_create_arrow.proto
command_create_counter.proto
command_create_token.proto
command_deck_del_dir.proto
command_deck_del.proto
command_deck_download.proto
command_deck_list.proto
command_deck_new_dir.proto
command_deck_select.proto
command_deck_upload.proto
command_del_counter.proto
command_delete_arrow.proto
command_draw_cards.proto
command_dump_zone.proto
command_flip_card.proto
command_game_say.proto
command_inc_card_counter.proto
command_inc_counter.proto
command_kick_from_game.proto
command_leave_game.proto
command_move_card.proto
command_mulligan.proto
command_next_turn.proto
command_ready_start.proto
command_replay_delete_match.proto
command_replay_list.proto
command_replay_download.proto
command_replay_modify_match.proto
command_reveal_cards.proto
command_roll_die.proto
command_set_active_phase.proto
command_set_card_attr.proto
command_set_card_counter.proto
command_set_counter.proto
command_set_sideboard_plan.proto
command_set_sideboard_lock.proto
command_shuffle.proto
commands.proto
command_stop_dump_zone.proto
command_undo_draw.proto
context_concede.proto
context_connection_state_changed.proto
context_deck_select.proto
context_move_card.proto
context_mulligan.proto
context_ping_changed.proto
context_ready_start.proto
context_set_sideboard_lock.proto
context_undo_draw.proto
event_add_to_list.proto
event_attach_card.proto
event_change_zone_properties.proto
event_connection_closed.proto
event_create_arrow.proto
event_create_counter.proto
event_create_token.proto
event_del_counter.proto
event_delete_arrow.proto
event_destroy_card.proto
event_draw_cards.proto
event_dump_zone.proto
event_flip_card.proto
event_game_closed.proto
event_game_host_changed.proto
event_game_joined.proto
event_game_say.proto
event_game_state_changed.proto
event_join.proto
event_join_room.proto
event_kicked.proto
event_leave.proto
event_leave_room.proto
event_list_games.proto
event_list_rooms.proto
event_move_card.proto
event_player_properties_changed.proto
event_remove_from_list.proto
event_replay_added.proto
event_reveal_cards.proto
event_roll_die.proto
event_room_say.proto
event_server_complete_list.proto
event_server_identification.proto
event_server_message.proto
event_server_shutdown.proto
event_set_active_phase.proto
event_set_active_player.proto
event_set_card_attr.proto
event_set_card_counter.proto
event_set_counter.proto
event_shuffle.proto
event_stop_dump_zone.proto
event_user_joined.proto
event_user_left.proto
event_user_message.proto
game_commands.proto
game_event_container.proto
game_event_context.proto
game_event.proto
game_replay.proto
isl_message.proto
moderator_commands.proto
move_card_to_zone.proto
response_deck_download.proto
response_deck_list.proto
response_deck_upload.proto
response_dump_zone.proto
response_get_games_of_user.proto
response_get_user_info.proto
response_join_room.proto
response_list_users.proto
response_login.proto
response_replay_download.proto
response_replay_list.proto
response.proto
room_commands.proto
room_event.proto
serverinfo_arrow.proto
serverinfo_cardcounter.proto
serverinfo_card.proto
serverinfo_counter.proto
serverinfo_deckstorage.proto
serverinfo_game.proto
serverinfo_gametype.proto
serverinfo_playerping.proto
serverinfo_playerproperties.proto
serverinfo_player.proto
serverinfo_replay.proto
serverinfo_replay_match.proto
serverinfo_room.proto
serverinfo_user.proto
serverinfo_zone.proto
server_message.proto
session_commands.proto
session_event.proto
)
include_directories
(
${
PROTOBUF_INCLUDE_DIRS
}
)
...
...
@@ -155,6 +155,6 @@ PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
add_library
(
cockatrice_protocol
${
PROTO_SRCS
}
${
PROTO_HDRS
}
)
set
(
cockatrice_protocol_LIBS
${
PROTOBUF_LIBRARIES
}
)
if
(
MSVC
)
set
(
cockatrice_protocol_LIBS
${
cockatrice_protocol_LIBS
}
-lprotobuf
)
set
(
cockatrice_protocol_LIBS
${
cockatrice_protocol_LIBS
}
-lprotobuf
)
endif
(
MSVC
)
target_link_libraries
(
cockatrice_protocol
${
cockatrice_protocol_LIBS
}
)
oracle/CMakeLists.txt
View file @
721cf6fe
...
...
@@ -8,11 +8,11 @@ PROJECT(oracle)
set
(
DESKTOPDIR share/applications CACHE STRING
"path to .desktop files"
)
SET
(
oracle_SOURCES
src/main.cpp
src/oracleimporter.cpp
src/window_main.cpp
../cockatrice/src/carddatabase.cpp
../cockatrice/src/settingscache.cpp
src/main.cpp
src/oracleimporter.cpp
src/window_main.cpp
../cockatrice/src/carddatabase.cpp
../cockatrice/src/settingscache.cpp
)
SET
(
QT_USE_QTNETWORK TRUE
)
...
...
@@ -28,45 +28,45 @@ ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_MOC_SRCS})
TARGET_LINK_LIBRARIES
(
oracle
${
QT_LIBRARIES
}
)
if
(
UNIX
)
if
(
APPLE
)
INSTALL
(
TARGETS oracle BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS oracle RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
if
(
APPLE
)
INSTALL
(
TARGETS oracle BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS oracle RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
elseif
(
WIN32
)
INSTALL
(
TARGETS oracle RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
INSTALL
(
TARGETS oracle RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
endif
()
IF
(
NOT WIN32 AND NOT APPLE
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/oracle.desktop DESTINATION
${
DESKTOPDIR
}
)
INSTALL
(
FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/oracle.desktop DESTINATION
${
DESKTOPDIR
}
)
ENDIF
(
NOT WIN32 AND NOT APPLE
)
if
(
APPLE
)
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/oracle.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/oracle.app/Contents/Resources
)
#
if(APPLE)
#
set(plugin_dest_dir ${CMAKE_INSTALL_PREFIX}/oracle.app/Contents/Plugins)
#
set(qtconf_dest_dir ${CMAKE_INSTALL_PREFIX}/oracle.app/Contents/Resources)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
#
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
#
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
#
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug\\.dylib")
#
else()
#
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
#
FILES_MATCHING REGEX "(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*\\.dylib")
#
endif()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
Plugins = Plugins
\"
)
"
COMPONENT Runtime
)
#
install(CODE "
#
file(WRITE \"${qtconf_dest_dir}/qt.conf\" \"[Paths]
#
Plugins = Plugins\")
#
" COMPONENT Runtime)
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
\"
${
plugin_dest_dir
}
/*.dylib
\"
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/oracle.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
endif
()
#
install(CODE "
#
file(GLOB_RECURSE QTPLUGINS
#
\"${plugin_dest_dir}/*.dylib\")
#
include(BundleUtilities)
#
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/oracle.app\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
#
" COMPONENT Runtime)
#
endif()
servatrice/CMakeLists.txt
View file @
721cf6fe
...
...
@@ -9,15 +9,15 @@ SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
FIND_PACKAGE
(
Libgcrypt REQUIRED
)
SET
(
servatrice_SOURCES
src/main.cpp
src/passwordhasher.cpp
src/servatrice.cpp
src/servatrice_connection_pool.cpp
src/servatrice_database_interface.cpp
src/server_logger.cpp
src/serversocketinterface.cpp
src/isl_interface.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
src/main.cpp
src/passwordhasher.cpp
src/servatrice.cpp
src/servatrice_connection_pool.cpp
src/servatrice_database_interface.cpp
src/server_logger.cpp
src/serversocketinterface.cpp
src/isl_interface.cpp
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
)
SET
(
QT_DONTUSE_QTGUI
)
...
...
@@ -38,47 +38,76 @@ TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${QT_LIBRARIES} ${LIBGCRYPT_L
#add_custom_target(versionheader ALL DEPENDS version_header)
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.h
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
COMMAND
${
CMAKE_COMMAND
}
-DSOURCE_DIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/../common/getversion.cmake
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.h
${
CMAKE_CURRENT_BINARY_DIR
}
/version_string.cpp
COMMAND
${
CMAKE_COMMAND
}
-DSOURCE_DIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
-P
${
CMAKE_CURRENT_SOURCE_DIR
}
/../common/getversion.cmake
)
# install rules
if
(
UNIX
)
if
(
APPLE
)
INSTALL
(
TARGETS servatrice BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS servatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
if
(
APPLE
)
INSTALL
(
TARGETS servatrice BUNDLE DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
else
()
# Assume linux
INSTALL
(
TARGETS servatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/bin
)
endif
()
elseif
(
WIN32
)
INSTALL
(
TARGETS servatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
INSTALL
(
TARGETS servatrice RUNTIME DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
endif
()
if
(
APPLE
)
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app/Contents/Resources
)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app/Contents/Resources
)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
Plugins = Plugins
\"
)
"
COMPONENT Runtime
)
"
COMPONENT Runtime
)
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
\"
${
plugin_dest_dir
}
/*.dylib
\"
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/servatrice.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
endif
()
if
(
APPLE
)
set
(
plugin_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/oracle.app/Contents/Plugins
)
set
(
qtconf_dest_dir
${
CMAKE_INSTALL_PREFIX
}
/oracle.app/Contents/Resources
)
# note: no codecs in qt5
# note: phonon_backend => mediaservice
# note: needs platform on osx
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/.*_debug
\\
.dylib"
)
else
()
install
(
DIRECTORY
"
${
QT_PLUGINS_DIR
}
/"
DESTINATION
${
plugin_dest_dir
}
COMPONENT Runtime
FILES_MATCHING REGEX
"(codecs|iconengines|imageformats|mediaservice|phonon_backend|platforms)/[^_]*
\\
.dylib"
)
endif
()
install
(
CODE
"
file(WRITE
\"
${
qtconf_dest_dir
}
/qt.conf
\"
\"
[Paths]
Plugins = Plugins
\"
)
"
COMPONENT Runtime
)
install
(
CODE
"
file(GLOB_RECURSE QTPLUGINS
\"
${
plugin_dest_dir
}
/*.dylib
\"
)
include(BundleUtilities)
fixup_bundle(
\"
${
CMAKE_INSTALL_PREFIX
}
/oracle.app
\"
\"\$
{QTPLUGINS}
\"
\"
${
QT_LIBRARY_DIR
}
\"
)
"
COMPONENT Runtime
)
endif
()
\ No newline at end of file
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