2016-07-25 16:27:53 +00:00
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/client/src/seven_zip ${ZLIB_INCLUDE_DIR})
|
|
|
|
|
|
|
|
FILE(GLOB SRC src/*.cpp src/*.h res/*.rc)
|
|
|
|
FILE(GLOB CLIENT_INSTALL_HDR src/*.h)
|
|
|
|
FILE(GLOB CLIENT_INSTALL_UIS ui/*.ui)
|
2016-09-29 15:07:28 +00:00
|
|
|
FILE(GLOB CLIENT_INSTALL_BASE_TRANS translations/qtbase*.ts)
|
|
|
|
FILE(GLOB CLIENT_INSTALL_TRANS translations/ryzom_installer_*.ts)
|
2016-07-25 16:27:53 +00:00
|
|
|
FILE(GLOB CLIENT_INSTALL_RCS res/*.qrc)
|
|
|
|
|
2016-08-06 18:05:02 +00:00
|
|
|
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
|
|
|
|
LIST(APPEND CLIENT_INSTALL_RCS ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
2016-07-25 16:27:53 +00:00
|
|
|
|
|
|
|
IF(WITH_QT)
|
|
|
|
INCLUDE_DIRECTORIES(${QT_INCLUDES})
|
|
|
|
INCLUDE(${QT_USE_FILE})
|
|
|
|
|
|
|
|
QT4_ADD_TRANSLATION(CLIENT_INSTALL_QM ${CLIENT_INSTALL_TRANS})
|
|
|
|
QT4_ADD_RESOURCES(CLIENT_INSTALL_RC_SRCS ${CLIENT_INSTALL_RCS})
|
|
|
|
QT4_WRAP_CPP(CLIENT_INSTALL_MOC_SRC ${CLIENT_INSTALL_HDR})
|
|
|
|
QT4_WRAP_UI(CLIENT_INSTALL_UI_HDRS ${CLIENT_INSTALL_UIS})
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
|
|
|
ELSE()
|
|
|
|
IF(WIN32)
|
|
|
|
FIND_PACKAGE(Qt5WinExtras)
|
|
|
|
SET(QT_LIBRARIES Qt5::WinExtras ${QT_LIBRARIES})
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
# uncomment this line if you want to update original translations
|
2016-09-16 16:58:57 +00:00
|
|
|
# QT5_CREATE_TRANSLATION(CLIENT_INSTALL_Q ${CLIENT_INSTALL_UIS} ${SRC} ${CLIENT_INSTALL_TRANS} OPTIONS -I ${CMAKE_CURRENT_SOURCE_DIR})
|
2016-09-29 15:07:28 +00:00
|
|
|
QT5_ADD_TRANSLATION(CLIENT_INSTALL_QM ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS})
|
2016-07-25 16:27:53 +00:00
|
|
|
QT5_ADD_RESOURCES(CLIENT_INSTALL_RC_SRCS ${CLIENT_INSTALL_RCS})
|
|
|
|
QT5_WRAP_CPP(CLIENT_INSTALL_MOC_SRC ${CLIENT_INSTALL_HDR})
|
|
|
|
QT5_WRAP_UI(CLIENT_INSTALL_UI_HDRS ${CLIENT_INSTALL_UIS})
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
SOURCE_GROUP("Source" FILES ${SRC})
|
|
|
|
SOURCE_GROUP("Resources" FILES ${CLIENT_INSTALL_RCS})
|
|
|
|
SOURCE_GROUP("Forms" FILES ${CLIENT_INSTALL_UIS})
|
|
|
|
SOURCE_GROUP("Generated Files" FILES ${CLIENT_INSTALL_UI_HDRS} ${CLIENT_INSTALL_MOC_SRC} ${CLIENT_INSTALL_RC_SRCS})
|
2016-09-29 15:07:28 +00:00
|
|
|
SOURCE_GROUP("Translation Files" FILES ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS})
|
2016-07-25 16:27:53 +00:00
|
|
|
|
2016-10-10 18:02:38 +00:00
|
|
|
# on Mac, create a .app Bundle
|
|
|
|
if(APPLE)
|
|
|
|
SET(MACOSX_BUNDLE_INFO_STRING "Ryzom Installer")
|
|
|
|
SET(MACOSX_BUNDLE_ICON_FILE "ryzom.icns")
|
2016-10-11 15:46:05 +00:00
|
|
|
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "com.winchgate.RyzomInstaller")
|
2016-10-10 18:02:38 +00:00
|
|
|
SET(MACOSX_BUNDLE_LONG_VERSION_STRING ${RYZOM_VERSION})
|
|
|
|
SET(MACOSX_BUNDLE_BUNDLE_NAME "Ryzom Installer")
|
|
|
|
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${RYZOM_VERSION})
|
|
|
|
SET(MACOSX_BUNDLE_BUNDLE_VERSION "1.0")
|
|
|
|
SET(MACOSX_BUNDLE_COPYRIGHT ${COPYRIGHT})
|
|
|
|
SET(RYZOM_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app)
|
|
|
|
SET(RYZOM_CONTENTS_DIR ${RYZOM_OUTPUT_DIR}/Contents)
|
|
|
|
SET(RYZOM_RESOURCES_DIR ${RYZOM_CONTENTS_DIR}/Resources)
|
|
|
|
SET(MAC_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/ryzom/client/macosx)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(ryzom_installer_qt WIN32 MACOSX_BUNDLE ${SRC} ${CLIENT_INSTALL_MOC_SRC} ${CLIENT_INSTALL_UI_HDRS} ${CLIENT_INSTALL_RC_SRCS} ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS} ${CLIENT_INSTALL_QM})
|
|
|
|
|
|
|
|
IF(APPLE)
|
2016-10-10 18:47:33 +00:00
|
|
|
SET_TARGET_PROPERTIES(ryzom_installer_qt PROPERTIES OUTPUT_NAME ${MACOSX_BUNDLE_BUNDLE_NAME})
|
2016-10-10 18:02:38 +00:00
|
|
|
SET_TARGET_PROPERTIES(ryzom_installer_qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${MAC_RESOURCES_DIR}/Info.plist)
|
|
|
|
ADD_CUSTOM_COMMAND(TARGET ryzom_installer_qt PRE_BUILD COMMAND mkdir -p ${RYZOM_RESOURCES_DIR})
|
|
|
|
ADD_CUSTOM_COMMAND(TARGET ryzom_installer_qt POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/PkgInfo ${RYZOM_CONTENTS_DIR})
|
|
|
|
ADD_CUSTOM_COMMAND(TARGET ryzom_installer_qt POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/ryzom.icns ${RYZOM_RESOURCES_DIR})
|
|
|
|
|
|
|
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
|
|
|
ADD_CUSTOM_COMMAND(TARGET ryzom_installer_qt POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing Ryzom Installer bundle...")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
2016-07-25 16:27:53 +00:00
|
|
|
NL_DEFAULT_PROPS(ryzom_installer_qt "Ryzom, Tools: Ryzom Installer" )
|
|
|
|
NL_ADD_RUNTIME_FLAGS(ryzom_installer_qt)
|
|
|
|
NL_ADD_LIB_SUFFIX(ryzom_installer_qt)
|
|
|
|
TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ryzom_sevenzip ${QT_LIBRARIES})
|
|
|
|
|
2016-09-22 16:47:53 +00:00
|
|
|
IF(WIN32)
|
|
|
|
TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ${WINSDK_LIBRARY_DIR}/Version.lib)
|
|
|
|
ENDIF()
|
|
|
|
|
2016-07-25 16:27:53 +00:00
|
|
|
IF(WITH_PCH)
|
|
|
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_installer_qt ${CMAKE_CURRENT_SOURCE_DIR}/src/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/src/stdpch.cpp)
|
|
|
|
ENDIF()
|
|
|
|
|
2016-10-10 18:02:38 +00:00
|
|
|
INSTALL(TARGETS ryzom_installer_qt RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications)
|
2016-07-27 09:54:35 +00:00
|
|
|
|
|
|
|
IF(UNIX AND NOT APPLE)
|
|
|
|
INSTALL(FILES res/ryzom_installer.png DESTINATION ${RYZOM_SHARE_PREFIX} COMPONENT client)
|
|
|
|
ENDIF()
|