Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / core / CMakeLists.txt
blobfefecf5aca421d50ba134bd3386f54a4f82bd3c7
1 INCLUDE_DIRECTORIES(    ${CMAKE_CURRENT_BINARY_DIR}
2                         ${CMAKE_CURRENT_SOURCE_DIR}
3                         ${QT_INCLUDES})
5 FILE(GLOB SRC *.cpp *.h)
6 SET( SRC ${SRC}
7                         ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h
8                         ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.cpp
9                         )
10                         
11 SET(OVQT_EXT_SYS_SRC    ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h
12                         ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h
13                         ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h)
15 SET(OVQT_CORE_PLUGIN_HDR
16                                 icore.h
17                                 icontext.h
18                                 icore_listener.h
19                                 ioptions_page.h
20                                 core_plugin.h
21                                 core.h
22                                 main_window.h
23                                 menu_manager.h
24                                 context_manager.h
25                                 settings_dialog.h
26                                 search_paths_settings_page.h
27                                 general_settings_page.h
28                                 plugin_view_dialog.h
29                                 ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h
32 SET(OVQT_CORE_PLUGIN_UIS        settings_dialog.ui
33                                 plugin_view_dialog.ui
34                                 general_settings_page.ui
35                                 search_paths_settings_page.ui
38 SET(OVQT_CORE_PLUGIN_RCS core.qrc)
40 IF(NOT WIN32)
41 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/core_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/core_config.h)
42 ENDIF()
44 SET(QT_USE_QTGUI TRUE)
45 SET(QT_USE_QTOPENGL TRUE)
47 QT4_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS})
48 QT4_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR})
49 QT4_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS})
51 SOURCE_GROUP(QtResources FILES ${OVQT_CORE_PLUGIN_UIS} ${OVQT_CORE_PLUGIN_RCS})
52 SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_CORE_PLUGIN_UI_HDRS})
53 SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_CORE_PLUGIN_MOC_SRC})
54 SOURCE_GROUP("Core Plugin" FILES ${SRC})
55 SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
57 ADD_LIBRARY(studio_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS})
59 TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc nel3d ${QT_LIBRARIES})
61 NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core")
62 NL_ADD_RUNTIME_FLAGS(studio_plugin_core)
63 NL_ADD_LIB_SUFFIX(studio_plugin_core)
65 ADD_DEFINITIONS(-DCORE_LIBRARY -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
67 IF(WIN32)
68   IF(WITH_INSTALL_LIBRARIES)
69     INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
70   ELSE()
71     INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
72   ENDIF()
73 ELSE()
74   IF(WITH_INSTALL_LIBRARIES)
75     INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
76   ELSE()
77     INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
78   ENDIF()
79 ENDIF()
81 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_core.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)