Merge branch '138-toggle-free-look-with-hotkey' into main/gingo-test
[ryzomcore.git] / CMakeLists.txt
blob7a86a2c71c8d64823ee999ffa3868ba157fd56d5
1 #-----------------------------------------------------------------------------
3 # Ryzom Core
4 #  Authors: Nevrax and the Ryzom Core Community
5 #  Version: 0.12.0
7 # Notes:
8 #   * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path
9 #   * Changing specific install location variables:
10 #       * NL_ETC_PREFIX (default: $CMAKE_INSTALL_PREFIX/etc)
11 #       * NL_SHARE_PREFIX (default: $CMAKE_INSTALL_PREFIX/share)
12 #       * NL_BIN_PREFIX (default: $CMAKE_INSTALL_PREFIX/bin)
13 #       * NL_SBIN_PREFIX  (default: $CMAKE_INSTALL_PREFIX/sbin)
14 #       * NL_LIB_PREFIX  (default: $CMAKE_INSTALL_PREFIX/lib)
15 #       * NL_DRIVER_PREFIX  (default: $CMAKE_INSTALL_PREFIX/lib (windows) or $CMAKE_INSTALL_PREFIX/lib/nel)
16 #   * Enable building of documentation: add -DBUILD_DOCUMENTATION:BOOL=ON - new make target: DoxygenDoc
17 #   * Updating version: update header (above) but also update NL_VERSION below.
18 #   * To build binary archive, use the 'package' target.
19 #     To build source archive, use the 'package_source' target.
21 #-----------------------------------------------------------------------------
22 # Load some macros.
23 SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
24 #-----------------------------------------------------------------------------
25 # Set CMake 2.6 Policies.
26 IF(COMMAND cmake_policy)
27   # Works around warnings libraries linked against that don't
28   # have absolute paths (e.g. -lpthread)
29   cmake_policy(SET CMP0003 NEW)
31   # allow to link to qtmain automatically under Windows
32   IF(POLICY CMP0020)
33     CMAKE_POLICY(SET CMP0020 NEW)
34   ENDIF()
35 ENDIF()
38 #-----------------------------------------------------------------------------
39 # Downloads and install Hunger into HUNTER_ROOT directory.
40 OPTION(HUNTER_ENABLED "Enable Hunter package manager" OFF)
41 IF(HUNTER_ENABLED)
42   INCLUDE("CMakeModules/HunterGate.cmake")
43   HunterGate(
44     URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz"
45     SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492"
46     FILEPATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModules/HunterConfig.cmake"
47   )
49   # default options for hunterized build
50   SET(WITH_STATIC         ON CACHE BOOL "static" FORCE)
51   SET(WITH_STATIC_DRIVERS ON CACHE BOOL "static drivers" FORCE)
52   SET(WITH_STATIC_CURL    ON CACHE BOOL "static curl" FORCE)
53   SET(WITH_STATIC_LIBXML2 ON CACHE BOOL "static libxml2" FORCE)
54   SET(WITH_STATIC_EXTERNAL ON CACHE BOOL "static external" FORCE)
55   SET(WITH_EXTERNAL       OFF CACHE BOOL "external libs" FORCE)
56 ENDIF()
59 #-----------------------------------------------------------------------------
61 INCLUDE(nel)
62 INCLUDE(ConfigureChecks)
63 INCLUDE(CheckDepends)
64 INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
66 MESSAGE("EXTERNAL ${WITH_EXTERNAL}")
68 # Force out of source builds.
69 CHECK_OUT_OF_SOURCE()
71 # To be able to specify a different deployment target on Mac OS X :
72 # export MACOSX_DEPLOYMENT_TARGET=10.6
74 IF(CMAKE_VERSION VERSION_GREATER "2.8.10")
75   STRING(TIMESTAMP CURRENT_YEAR "%Y")
76 ELSE()
77   SET(CURRENT_YEAR "2019")
78 ENDIF()
80 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
81 PROJECT(RyzomCore CXX C)
82 SET(NL_VERSION_MAJOR 1)
83 SET(NL_VERSION_MINOR 1)
84 SET(NL_VERSION_PATCH 0 CACHE STRING "Patch version")
85 SET(YEAR "2001-${CURRENT_YEAR}")
86 SET(AUTHOR "Winch Gate and The Ryzom Core Community")
88 SET(RYZOM_VERSION_MAJOR 3)
89 SET(RYZOM_VERSION_MINOR 6)
90 SET(RYZOM_VERSION_PATCH 0)
92 #-----------------------------------------------------------------------------
93 # Redirect output files
94 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
95 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
97 # DLL should be in the same directory as EXE under Windows
98 IF(WIN32)
99   SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
100 ELSE()
101   SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
102 ENDIF()
104 IF(WIN32)
105   IF(WITH_MFC)
106     FIND_PACKAGE(MFC QUIET)
107   ENDIF()
108 ENDIF()
110 #-----------------------------------------------------------------------------
111 # Set default config options
113 NL_SETUP_DEFAULT_OPTIONS()
114 NL_SETUP_NEL_DEFAULT_OPTIONS()
115 NL_SETUP_NELNS_DEFAULT_OPTIONS()
116 NL_SETUP_RYZOM_DEFAULT_OPTIONS()
117 NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
119 NL_SETUP_BUILD()
120 NL_SETUP_BUILD_FLAGS()
122 NL_SETUP_PREFIX_PATHS()
123 RYZOM_SETUP_PREFIX_PATHS()
125 #-----------------------------------------------------------------------------
126 # Default values for URL's
127 SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL  "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Create Account URL")
128 SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL    "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL")
129 SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL")
130 SET(RYZOM_CLIENT_PATCH_URL           "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL")
131 SET(RYZOM_CLIENT_APP_NAME            "default")
133 SET(RYZOM_WEBIG_MAIN_URL             "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL")
134 SET(RYZOM_WEBIG_TRUSTED_DOMAIN       "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain")
136 #-----------------------------------------------------------------------------
137 # urls when compiling ryzom live client
138 IF(WITH_RYZOM_LIVE)
139   MESSAGE("Using RYZOM_LIVE urls")
140   SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL  "https://me.ryzom.com")
141   SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL    "https://me.ryzom.com")
142   SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://me.ryzom.com/?forget_password=1")
143   SET(RYZOM_CLIENT_PATCH_URL           "http://dl.ryzom.com/patch_live")
144   SET(RYZOM_CLIENT_APP_NAME            "ryzom_live")
146   SET(RYZOM_WEBIG_MAIN_URL             "https://app.ryzom.com/")
147   SET(RYZOM_WEBIG_TRUSTED_DOMAIN       "app.ryzom.com")
148 ENDIF()
150 #-----------------------------------------------------------------------------
151 #Platform specifics
153 SETUP_EXTERNAL()
155 IF(WIN32)
156   SET(WINSOCK2_LIB ws2_32.lib)
158   IF(WITH_MFC)
159     FIND_PACKAGE(CustomMFC REQUIRED)
160   ENDIF()
161 ENDIF()
163 IF(HUNTER_ENABLED)
164   ## TODO: hack for freetype hunter package
165   SET(ON 1)
166   ##
167   HUNTER_ADD_PACKAGE(ZLIB)
169   FIND_PACKAGE(ZLIB CONFIG REQUIRED)
170   SET(ZLIB_LIBRARY ZLIB::zlib)
172   HUNTER_ADD_PACKAGE(libxml2)
173   FIND_PACKAGE(libxml2 CONFIG REQUIRED)
174   SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} libxml2::libxml2)
176   HUNTER_ADD_PACKAGE(OpenSSL)
177   FIND_PACKAGE(OpenSSL REQUIRED)
178   # TODO: is OpenSSL::Crypto only needed for WIN32?
179   SET(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
181   # for precompiled headers, not needed if using TARGET_PRECOMPILE_HEADERS() from cmake 3.16+
182   SET(ZLIB_INCLUDE_DIR ZLIB_ROOT/include)
183   SET(LIBXML2_INCLUDE_DIR ${LIBXML2_ROOT}/include/libxml2)
184 ELSE()
185 FIND_PACKAGE(ZLIB REQUIRED)
186 FIND_PACKAGE(LibXml2 REQUIRED)
187 FIND_PACKAGE(PNG REQUIRED)
188 FIND_PACKAGE(OpenSSL REQUIRED)
189 FIND_PACKAGE(GIF)
190 FIND_PACKAGE(Jpeg)
192 IF(WIN32)
193   SET(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} Crypt32.lib)
194 ENDIF()
195 ENDIF() #hunter
197 IF(WITH_LIBOVR)
198   FIND_PACKAGE(LibOVR)
199 ENDIF()
201 IF(WITH_LIBVR)
202   FIND_PACKAGE(LibVR)
203 ENDIF()
205 NL_CONFIGURE_CHECKS()
207 IF(WITH_STATIC_LIBXML2)
208   SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
209 ENDIF()
211 IF(WITH_LIBXML2_ICONV)
212   FIND_PACKAGE(Iconv REQUIRED)
213   INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
214   SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
215 ENDIF()
217 IF(WITH_STATIC)
218   # libxml2 could need winsock2 library
219   IF(WINSOCK2_LIB)
220     SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
221   ENDIF()
223   IF(UNIX)
224     # under Linux and OS X, recent libxml2 versions are linked against liblzma
225     FIND_PACKAGE(LibLZMA)
226     IF(LIBLZMA_LIBRARIES)
227       SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
228     ENDIF()
230     # under Linux and OS X, recent libxml2 versions are linked against libicu
231     # FIND_PACKAGE(Icu)
232     FIND_LIBRARY(ICU_LIBRARY icuuc)
233     IF(ICU_LIBRARY)
234        FIND_LIBRARY(ICU_DATA_LIBRARY icudata)
235        IF(ICU_LIBRARY)
236          MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}")
237        ELSE()
238          MESSAGE(STATUS "ICU UC was NOT found")
239        ENDIF()
240        SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY})
241     ENDIF()
243   ENDIF()
244 ENDIF()
246 INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
248 IF(FINAL_VERSION)
249   ADD_DEFINITIONS(-DFINAL_VERSION=1)
250 ENDIF()
252 IF(WITH_SSE2)
253   ADD_DEFINITIONS(-DNL_HAS_SSE2)
254   IF(WITH_SSE3)
255     ADD_DEFINITIONS(-DNL_HAS_SSE3)
256   ENDIF()
257 ENDIF()
259 IF(APPLE)
260   FIND_LIBRARY(CARBON_FRAMEWORK Carbon)
261   FIND_LIBRARY(FOUNDATION_FRAMEWORK Foundation)
262   FIND_LIBRARY(SECURITY_FRAMEWORK Security)
264   IF(APPLE_CERTIFICATE)
265     # Find codesign_allocate
267     # Xcode 7.0 and later versions
268     SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate)
270     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
271       # Xcode 6.4 and previous versions
272       SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate)
273     ENDIF()
275     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
276       # System path
277       SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate)
278     ENDIF()
280     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
281       MESSAGE(WARNING "Unable to find codesign_allocate in standard directories")
282       SET(CODESIGN_ALLOCATE)
283     ENDIF()
284   ENDIF()
285 ENDIF()
287 INCLUDE(FindHelpers)
289 #TODO: hunter qt package
290 IF(WITH_QT5)
291   FIND_QT5()
292 ENDIF()
294 IF(WITH_QT)
295   SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QTDIR} $ENV{QTDIR})
297   # Use Qt 4
298   FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
299 ENDIF()
301 #TODO: hunter assimp package
302 IF(WITH_ASSIMP)
303   FIND_PACKAGE(assimp REQUIRED)
304 ENDIF()
306 IF(WITH_NEL)
307   IF(WITH_NEL_TESTS)
308     FIND_PACKAGE(CppTest)
309   ENDIF()
311   IF(HUNTER_ENABLED)
312     IF(WITH_GUI)
313       HUNTER_ADD_PACKAGE(luabind)
314       FIND_PACKAGE(Luabind REQUIRED)
315     ENDIF()
317     HUNTER_ADD_PACKAGE(CURL)
318     FIND_PACKAGE(CURL CONFIG REQUIRED)
319     # TODO: for nelgui
320     SET(CURL_LIBRARIES CURL::libcurl libxml2::libxml2)
321   ELSE()
322     IF(WITH_GUI)
323       FIND_PACKAGE(Luabind REQUIRED)
324     ENDIF()
326     FIND_PACKAGE(CURL REQUIRED)
328     IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
329       SET(CURL_STATIC ON)
330     ELSE()
331       SET(CURL_STATIC OFF)
332     ENDIF()
334     IF(CURL_STATIC)
335       SET(CURL_DEFINITIONS -DCURL_STATICLIB)
337       LIST(APPEND CURL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
338       LIST(APPEND CURL_LIBRARIES ${OPENSSL_LIBRARIES})
340       IF(WIN32)
341         LIST(APPEND CURL_LIBRARIES Crypt32 Cryptui)
342       ELSE()
343         # CURL depends on libidn
344         FIND_LIBRARY(IDN_LIBRARY idn)
345         IF(IDN_LIBRARY)
346           LIST(APPEND CURL_LIBRARIES ${IDN_LIBRARY})
347         ENDIF()
349         # CURL Macports version can depend on libidn, libidn2, libintl, libpsl and libiconv too
350         IF(APPLE)
351           FIND_LIBRARY(INTL_LIBRARY intl)
352           IF(INTL_LIBRARY)
353             LIST(APPEND CURL_LIBRARIES ${INTL_LIBRARY})
354           ENDIF()
356           FIND_LIBRARY(IDN2_LIBRARY idn2)
357           IF(IDN2_LIBRARY)
358             LIST(APPEND CURL_LIBRARIES ${IDN2_LIBRARY})
359           ENDIF()
361           FIND_LIBRARY(PSL_LIBRARY psl)
362           IF(PSL_LIBRARY)
363             LIST(APPEND CURL_LIBRARIES ${PSL_LIBRARY})
364           ENDIF()
366           FIND_LIBRARY(UNISTRING_LIBRARY unistring)
367           IF(UNISTRING_LIBRARY)
368             LIST(APPEND CURL_LIBRARIES ${UNISTRING_LIBRARY})
369           ENDIF()
371           LIST(APPEND CURL_LIBRARIES ${SECURITY_FRAMEWORK})
372         ENDIF()
373       ENDIF()
374     ENDIF()
375   ENDIF() #hunter
377   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
378   ADD_SUBDIRECTORY(nel)
380   # Aliases for targets
381   SET(NELMISC_LIBRARIES nelmisc)
382   SET(NELNET_LIBRARIES nelnet)
383   SET(NELLIGO_LIBRARIES nelligo)
384   SET(NELGEORGES_LIBRARIES nelgeorges)
385   SET(NEL3D_LIBRARIES nel3d)
386   SET(NELGUI_LIBRARIES nelgui)
387   SET(NELSOUND_LIBRARIES nelsound)
388   SET(NELPACS_LIBRARIES nelpacs)
389 ELSE()
390 #  FIND_PACKAGE(NeL COMPONENTS 3d misc pacs sound nimp REQUIRED)
391   FIND_PACKAGE(NeL REQUIRED)
392   INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIRS})
393 ENDIF()
395 IF(WITH_RYZOM)
396   ADD_SUBDIRECTORY(ryzom)
397 ENDIF()
399 IF(WITH_NELNS)
400   ADD_SUBDIRECTORY(nelns)
401 ENDIF()
403 IF(WITH_SNOWBALLS)
404   ADD_SUBDIRECTORY(snowballs2)
405 ENDIF()
407 IF(WITH_TOOLS)
408   ADD_SUBDIRECTORY(tool)
409 ENDIF()
411 IF(WITH_STUDIO)
412   ADD_SUBDIRECTORY(studio)
413 ENDIF()
415 IF(WITH_PERSONAL)
416   ADD_SUBDIRECTORY(personal)
417 ENDIF()
419 # To build the documention, you will have to enable it
420 # and then do the equivalent of "make DoxygenDoc".
421 IF(BUILD_DOCUMENTATION)
422     IF(DOT)
423         SET(HAVE_DOT YES)
424     ELSE()
425         SET(HAVE_DOT NO)
426     ENDIF()
427     # This processes our Doxyfile.in and substitutes paths to generate
428     # a final Doxyfile
429     CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
431     ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
432 ENDIF()
434 IF(WITH_NEL_TESTS)
435   ENABLE_TESTING()
436   ADD_TEST(nel_unit_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nel_unit_test --html)
437   IF(BUILD_DASHBOARD)
438     INCLUDE(Dart)
439     SET(SVNCOMMAND svn)
440     SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
441     SET(GENERATELOGS svn2cl)
442   ENDIF()
443 ENDIF()
445 # packaging information
446 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
447 SET(CPACK_PACKAGE_VENDOR "Ryzom Core")
448 SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README)
449 SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
450 SET(CPACK_PACKAGE_VERSION_MAJOR "${NL_VERSION_MAJOR}")
451 SET(CPACK_PACKAGE_VERSION_MINOR "${NL_VERSION_MINOR}")
452 SET(CPACK_PACKAGE_VERSION_PATCH "${NL_VERSION_PATCH}")
453 SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};NeL;ALL;/")
454 SET(CPACK_PACKAGE_EXECUTABLES "ryzomcore${NL_VERSION}" "ryzomcore")
455 SET(CPACK_SET_DESTDIR TRUE)
457 # NSIS Specific Packing Setup
458 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "RyzomCore")
459 SET(CPACK_NSIS_MODIFY_PATH "ON")
460 SET(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico)
461 SET(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico)
462 SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/resources\\\\nel.bmp)
463 SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} RyzomCore")
464 SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\dev.ryzom.com")
465 SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\dev.ryzom.com\\\\projects\\\\nel\\\\wiki")
466 SET(CPACK_NSIS_CONTACT "matt.raykowski@gmail.com")
468 ## Source Packages
469 SET(CPACK_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}")
470 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}")
471 IF(WIN32)
472   #SET(CPACK_GENERATOR "NSIS")
473   SET(CPACK_GENERATOR "NSIS;ZIP")
474   SET(CPACK_SOURCE_GENERATOR "ZIP")
475 ELSE()
476   SET(CPACK_GENERATOR "TGZ")
477   SET(CPACK_SOURCE_GENERATOR "TGZ")
478 ENDIF()
479 set(CPACK_SOURCE_IGNORE_FILES
480         "~$"
481         "\\\\.cvsignore$"
482         "^${CMAKE_SOURCE_DIR}.*/CVS/"
483         "^${CMAKE_SOURCE_DIR}.*/\\\\.svn/"
484         "^${CMAKE_SOURCE_DIR}/debian/"
485         "^${CMAKE_SOURCE_DIR}/old/")
486 IF(WIN32)
487   IF(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
488     SET(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
489     IF(WITH_QT)
490       INCLUDE(${QT_USE_FILE})
491       INSTALL(FILES
492         "${QT_LIBRARY_DIR}/../bin/QtGuid4.dll"
493         "${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
494         "${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
495         DESTINATION ${NL_BIN_PREFIX})
496     ENDIF()
497   ELSE()
498     IF(WITH_QT)
499       INCLUDE(${QT_USE_FILE})
500       INSTALL(FILES
501         "${QT_LIBRARY_DIR}/../bin/QtGui4.dll"
502         "${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
503         "${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
504         DESTINATION ${NL_BIN_PREFIX})
505     ENDIF()
506   ENDIF()
508   # Install CEGUI and its dependencies.
509   IF(WITH_NEL_CEGUI)
510     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIBase.dll" DESTINATION ${NL_BIN_PREFIX})
511     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIDevilImageCodec.dll" DESTINATION ${NL_BIN_PREFIX})
512     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIExpatParser.dll" DESTINATION ${NL_BIN_PREFIX})
513     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
514     INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
515     INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
516   ENDIF()
518   # Only the tools require MFC.
519   IF(WITH_TOOLS)
520     SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
521   ENDIF()
522   #INCLUDE(InstallRequiredSystemLibraries)
523 ENDIF()
525 INCLUDE(CPack)
527 INCLUDE(CMakePackaging.txt)
529 ## Debian Packages
530 #INCLUDE(UseDebian)
531 #IF(DEBIAN_FOUND)
532 #  ADD_DEBIAN_TARGETS(nel)
533 #ENDIF()