Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F117735
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6d4232..aa04aca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,103 +1,107 @@
cmake_minimum_required(VERSION 2.8.12)
# Projet name
project("Witch_Blast")
# Detect compiler
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(USING_GCC TRUE)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(USING_CLANG TRUE)
endif()
# For GCC and Clang, enable C++11 support and add some other flags
if(USING_GCC OR USING_CLANG)
add_compile_options(-std=c++11 -pedantic -Wall)
endif()
# Compilation options
option(ONLINE_MODE "Enable online mode, which requires src/OnlineScoring.h" OFF)
if(ONLINE_MODE)
add_compile_options(-DONLINE_MODE)
endif()
include_directories(.)
file(
GLOB_RECURSE
source_files
src/*
)
if(APPLE)
set(${source_files} “${source_files} src/ressources/witchblast.icns”)
set_source_files_properties(src/ressources/witchblast.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(MACOSX_BUNDLE_ICON_FILE witchblast.icns)
endif()
add_executable(
"Witch_Blast"
MACOSX_BUNDLE
${source_files}
)
set_target_properties(Witch_Blast PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
)
if(APPLE)
set_target_properties(Witch_Blast PROPERTIES
MACOSX_RPATH 1
BUILD_WITH_INSTALL_RPATH 1
INSTALL_RPATH "@loader_path/../Frameworks")
set(EXTRA_LIBRARIES "-framework CoreFoundation")
endif()
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
-find_package(SFML 2.2 REQUIRED system window graphics audio)
+if(ONLINE_MODE)
+ find_package(SFML 2.2 REQUIRED system window graphics audio network)
+else()
+ find_package(SFML 2.2 REQUIRED system window graphics audio)
+endif()
target_link_libraries(Witch_Blast ${SFML_LIBRARIES} ${EXTRA_LIBRARIES})
include_directories(${SFML_INCLUDE_DIR})
Message(${SFML_LIBRARIES})
if(APPLE)
install(
DIRECTORY Witch_Blast.app
DESTINATION "."
USE_SOURCE_PERMISSIONS)
install(
DIRECTORY
${CMAKE_SOURCE_DIR}/data
${CMAKE_SOURCE_DIR}/media
DESTINATION Witch_Blast.app/Contents/Resources)
# copy SFML frameworks into app bundle for Mac OS X
set(LIBS SFML sfml-system sfml-window sfml-graphics sfml-audio)
foreach(LIB ${LIBS})
install(DIRECTORY /Library/Frameworks/${LIB}.framework
DESTINATION Witch_Blast.app/Contents/Frameworks)
endforeach()
install(FILES
${CMAKE_SOURCE_DIR}/COPYING.txt
${CMAKE_SOURCE_DIR}/readme.txt
DESTINATION ".")
endif()
# Packaging
SET(CPACK_PACKAGE_VERSION "0.7")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "7")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_EXECUTABLES "Witch_Blast;Witch Blast")
if(APPLE)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_VOLUME_NAME "Witch Blast")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_ICON src/ressources/witchblast.icns)
# TODO: CPACK_DMG_BACKGROUND_IMAGE
# TODO: CPACK_DMG_DS_STORE
endif()
include(CPack)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, May 14, 9:30 PM (1 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
63135
Default Alt Text
(3 KB)
Attached To
Mode
R78 witchblast
Attached
Detach File
Event Timeline