mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 12:50:53 +00:00
62 lines
2.8 KiB
CMake
62 lines
2.8 KiB
CMake
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)
|
|
FILE(GLOB CLIENT_INSTALL_BASE_TRANS translations/qtbase*.ts)
|
|
FILE(GLOB CLIENT_INSTALL_TRANS translations/ryzom_installer_*.ts)
|
|
FILE(GLOB CLIENT_INSTALL_RCS res/*.qrc)
|
|
|
|
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
|
|
LIST(APPEND CLIENT_INSTALL_RCS ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
|
|
|
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
|
|
# QT5_CREATE_TRANSLATION(CLIENT_INSTALL_Q ${CLIENT_INSTALL_UIS} ${SRC} ${CLIENT_INSTALL_TRANS} OPTIONS -I ${CMAKE_CURRENT_SOURCE_DIR})
|
|
QT5_ADD_TRANSLATION(CLIENT_INSTALL_QM ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS})
|
|
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})
|
|
SOURCE_GROUP("Translation Files" FILES ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS})
|
|
|
|
ADD_EXECUTABLE(ryzom_installer_qt WIN32 ${SRC} ${CLIENT_INSTALL_MOC_SRC} ${CLIENT_INSTALL_UI_HDRS} ${CLIENT_INSTALL_RC_SRCS} ${CLIENT_INSTALL_TRANS} ${CLIENT_INSTALL_BASE_TRANS} ${CLIENT_INSTALL_QM})
|
|
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})
|
|
|
|
IF(WIN32)
|
|
TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ${WINSDK_LIBRARY_DIR}/Version.lib)
|
|
ENDIF()
|
|
|
|
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()
|
|
|
|
INSTALL(TARGETS ryzom_installer_qt RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client)
|
|
|
|
IF(UNIX AND NOT APPLE)
|
|
INSTALL(FILES res/ryzom_installer.png DESTINATION ${RYZOM_SHARE_PREFIX} COMPONENT client)
|
|
ENDIF()
|