Fix development database user creation
[ryzomcore.git] / CMakeLists.txt
blob2a23a8ee3f63a63aba7f2dd1cb454839a7663ff2
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)
57  # Workaround for PCH compilation issue, from curl intsizeof depencency
58   ADD_DEFINITIONS(-D__STDC_LIMIT_MACROS)
59 ENDIF()
62 #-----------------------------------------------------------------------------
64 INCLUDE(nel)
65 INCLUDE(ConfigureChecks)
66 INCLUDE(CheckDepends)
67 INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
69 # Force out of source builds.
70 CHECK_OUT_OF_SOURCE()
72 # To be able to specify a different deployment target on Mac OS X :
73 # export MACOSX_DEPLOYMENT_TARGET=10.6
75 IF(CMAKE_VERSION VERSION_GREATER "2.8.10")
76   STRING(TIMESTAMP CURRENT_YEAR "%Y")
77 ELSE()
78   SET(CURRENT_YEAR "2019")
79 ENDIF()
81 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
82 PROJECT(RyzomCore CXX C)
83 SET(NL_VERSION_MAJOR 4)
84 SET(NL_VERSION_MINOR 0)
85 SET(NL_VERSION_PATCH 0 CACHE STRING "Patch version")
86 SET(NL_VERSION_BUILD 0 CACHE STRING "Build number")
87 SET(YEAR "2001-${CURRENT_YEAR}")
88 SET(AUTHOR "Winch Gate and The Ryzom Core Community")
90 #-----------------------------------------------------------------------------
91 # Redirect output files
92 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
93 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
95 # DLL should be in the same directory as EXE under Windows
96 IF(WIN32)
97   SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
98 ELSE()
99   SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
100 ENDIF()
102 IF(WIN32)
103   IF(WITH_MFC)
104     FIND_PACKAGE(MFC QUIET)
105   ENDIF()
106 ENDIF()
108 #-----------------------------------------------------------------------------
109 # Set default config options
111 NL_SETUP_DEFAULT_OPTIONS()
112 NL_SETUP_NEL_DEFAULT_OPTIONS()
113 NL_SETUP_NELNS_DEFAULT_OPTIONS()
114 NL_SETUP_RYZOM_DEFAULT_OPTIONS()
115 NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
117 NL_SETUP_BUILD()
118 NL_SETUP_BUILD_FLAGS()
120 NL_SETUP_PREFIX_PATHS()
121 RYZOM_SETUP_PREFIX_PATHS()
123 #-----------------------------------------------------------------------------
124 # Default values for URL's
125 SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL     "https://core.ryzom.dev/ams/" CACHE STRING "Ryzom Client Create Account URL")
126 SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL       "https://core.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL")
127 SET(RYZOM_CLIENT_FORGET_PASSWORD_URL    "https://core.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL")
128 SET(RYZOM_CLIENT_PATCH_URL              "https://cdn.ryzom.dev/core4/patch/" CACHE STRING "Ryzom Client Patch URL")
129 SET(RYZOM_CLIENT_APP_NAME               "core4")
131 SET(RYZOM_CLIENT_RELEASENOTES_URL       "https://core4.ryzom.dev/releasenotes/index.php" CACHE STRING "Ryzom Client Release Notes URL")
132 SET(RYZOM_CLIENT_RELEASENOTES_RING_URL  "https://core4.ryzom.dev/releasenotes_ring/index.php" CACHE STRING "Ryzom Client Release Notes URL")
134 #-----------------------------------------------------------------------------
135 # urls when compiling ryzom live client
136 IF(WITH_RYZOM_LIVE)
137   MESSAGE("Using RYZOM_LIVE urls")
138   SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL   "https://account.ryzom.com/signup/from_client.php")
139   SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL     "https://account.ryzom.com/payment_profile/index.php")
140   SET(RYZOM_CLIENT_FORGET_PASSWORD_URL  "https://account.ryzom.com/payment_profile/lost_secure_password.php")
141   SET(RYZOM_CLIENT_PATCH_URL            "http://dl.ryzom.com/patch_live")
142   SET(RYZOM_CLIENT_APP_NAME             "ryzom_live")
144 SET(RYZOM_CLIENT_RELEASENOTES_URL       "https://app.ryzom.com/releasenotes/index.php")
145 SET(RYZOM_CLIENT_RELEASENOTES_RING_URL  "https://app.ryzom.com/releasenotes_ring/index.php")
146 ENDIF()
148 #-----------------------------------------------------------------------------
149 #Platform specifics
151 SETUP_EXTERNAL()
153 IF(WIN32)
154   SET(WINSOCK2_LIB ws2_32.lib)
156   IF(WITH_MFC)
157     FIND_PACKAGE(CustomMFC REQUIRED)
158   ENDIF()
159 ENDIF()
161 IF(HUNTER_ENABLED)
162   # This fix is for compiling OpenSSL in Azure Pipeline linux agent where ENV{SYSTEM} == "build"
163   IF(DEFINED ENV{SYSTEM} AND UNIX AND NOT APPLE)
164     STRING(TOUPPER "$ENV{SYSTEM}" _tmp)
165     IF (_tmp STREQUAL "BUILD")
166       UNSET(ENV{SYSTEM})
167     ENDIF()
168     UNSET(_tmp)
169   ENDIF()
170   ## TODO: hack for freetype hunter package
171   SET(ON 1)
172   ##
173   HUNTER_ADD_PACKAGE(ZLIB)
175   FIND_PACKAGE(ZLIB CONFIG REQUIRED)
176   SET(ZLIB_LIBRARY ZLIB::zlib)
178   HUNTER_ADD_PACKAGE(libxml2)
179   FIND_PACKAGE(libxml2 CONFIG REQUIRED)
180   SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} libxml2::libxml2)
182   HUNTER_ADD_PACKAGE(OpenSSL)
183   FIND_PACKAGE(OpenSSL REQUIRED)
184   # TODO: is OpenSSL::Crypto only needed for WIN32?
185   SET(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
187   # for precompiled headers, not needed if using TARGET_PRECOMPILE_HEADERS() from cmake 3.16+
188   SET(ZLIB_INCLUDE_DIR ZLIB_ROOT/include)
189   SET(LIBXML2_INCLUDE_DIR ${LIBXML2_ROOT}/include/libxml2)
190 ELSE()
191 FIND_PACKAGE(ZLIB REQUIRED)
192 FIND_PACKAGE(LibXml2 REQUIRED)
193 FIND_PACKAGE(PNG REQUIRED)
194 FIND_PACKAGE(OpenSSL REQUIRED)
195 FIND_PACKAGE(GIF)
196 FIND_PACKAGE(Jpeg)
198 IF(WIN32)
199   SET(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} Crypt32.lib)
200 ENDIF()
201 ENDIF() #hunter
203 IF(WITH_LIBOVR)
204   FIND_PACKAGE(LibOVR)
205 ENDIF()
207 IF(WITH_LIBVR)
208   FIND_PACKAGE(LibVR)
209 ENDIF()
211 NL_CONFIGURE_CHECKS()
213 IF(WITH_STATIC_LIBXML2)
214   ADD_DEFINITIONS(-DLIBXML_STATIC)
215 ENDIF()
217 FIND_PACKAGE(Iconv QUIET)
218 IF(ICONV_FOUND)
219   INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
220   SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
221 ENDIF()
223 IF(WITH_STATIC)
224   # libxml2 could need winsock2 library
225   IF(WINSOCK2_LIB)
226     SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
227   ENDIF()
229   IF(UNIX AND NOT HUNTER_ENABLED)
230     # under Linux and OS X, recent libxml2 versions are linked against liblzma
231     FIND_PACKAGE(LibLZMA)
232     IF(LIBLZMA_LIBRARIES)
233       SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
234     ENDIF()
236     # under Linux and OS X, recent libxml2 versions are linked against libicu
237     # FIND_PACKAGE(Icu)
238     FIND_LIBRARY(ICU_LIBRARY icuuc)
239     IF(ICU_LIBRARY)
240        FIND_LIBRARY(ICU_DATA_LIBRARY icudata)
241        IF(ICU_LIBRARY)
242          MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}")
243        ELSE()
244          MESSAGE(STATUS "ICU UC was NOT found")
245        ENDIF()
246        SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY})
247     ENDIF()
249   ENDIF()
250 ENDIF()
252 INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
254 IF(FINAL_VERSION)
255   ADD_DEFINITIONS(-DFINAL_VERSION=1)
256 ENDIF()
258 IF(WITH_SSE2)
259   ADD_DEFINITIONS(-DNL_HAS_SSE2)
260   IF(WITH_SSE3)
261     ADD_DEFINITIONS(-DNL_HAS_SSE3)
262   ENDIF()
263 ENDIF()
265 IF(APPLE)
266   FIND_LIBRARY(CARBON_FRAMEWORK Carbon)
267   FIND_LIBRARY(FOUNDATION_FRAMEWORK Foundation)
268   FIND_LIBRARY(SECURITY_FRAMEWORK Security)
270   IF(APPLE_CERTIFICATE)
271     # Find codesign_allocate
273     # Xcode 7.0 and later versions
274     SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate)
276     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
277       # Xcode 6.4 and previous versions
278       SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate)
279     ENDIF()
281     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
282       # System path
283       SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate)
284     ENDIF()
286     IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
287       MESSAGE(WARNING "Unable to find codesign_allocate in standard directories")
288       SET(CODESIGN_ALLOCATE)
289     ENDIF()
290   ENDIF()
291 ENDIF()
293 INCLUDE(FindHelpers)
295 #TODO: hunter qt package
296 IF(WITH_QT5)
297   FIND_QT5()
298 ENDIF()
300 IF(WITH_QT)
301   SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QTDIR} $ENV{QTDIR})
303   # Use Qt 4
304   FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
305 ENDIF()
307 #TODO: hunter assimp package
308 IF(WITH_ASSIMP)
309   FIND_PACKAGE(assimp REQUIRED)
310 ENDIF()
312 IF(WITH_NEL)
313   IF(WITH_NEL_TESTS)
314     FIND_PACKAGE(CppTest)
315   ENDIF()
317   IF(HUNTER_ENABLED)
318     IF(WITH_GUI)
319       HUNTER_ADD_PACKAGE(luabind)
320       FIND_PACKAGE(Luabind REQUIRED)
321     ENDIF()
323     HUNTER_ADD_PACKAGE(CURL)
324     FIND_PACKAGE(CURL CONFIG REQUIRED)
325     # TODO: for nelgui
326     SET(CURL_LIBRARIES CURL::libcurl libxml2::libxml2)
327   ELSE()
328     IF(WITH_GUI)
329       FIND_PACKAGE(Luabind REQUIRED)
330     ENDIF()
332     FIND_PACKAGE(CURL REQUIRED)
333     # if cmake finds config-file package, ie FIND_PACKAGE(CURL CONFIG), then CURL_LIBRARIES is not defined
334     IF(TARGET CURL::libcurl)
335       SET(CURL_LIBRARIES CURL::libcurl)
336     ENDIF()
338     IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL)
339       SET(CURL_STATIC ON)
340     ELSE()
341       SET(CURL_STATIC OFF)
342     ENDIF()
344     IF(CURL_STATIC)
345       SET(CURL_DEFINITIONS -DCURL_STATICLIB)
347       LIST(APPEND CURL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
348       LIST(APPEND CURL_LIBRARIES ${OPENSSL_LIBRARIES})
350       IF(WIN32)
351         LIST(APPEND CURL_LIBRARIES Crypt32 Cryptui)
352       ELSE()
353         # CURL depends on libidn
354         FIND_LIBRARY(IDN_LIBRARY idn)
355         IF(IDN_LIBRARY)
356           LIST(APPEND CURL_LIBRARIES ${IDN_LIBRARY})
357         ENDIF()
359         # CURL Macports version can depend on libidn, libidn2, libintl, libpsl and libiconv too
360         IF(APPLE)
361           FIND_LIBRARY(INTL_LIBRARY intl)
362           IF(INTL_LIBRARY)
363             LIST(APPEND CURL_LIBRARIES ${INTL_LIBRARY})
364           ENDIF()
366           FIND_LIBRARY(IDN2_LIBRARY idn2)
367           IF(IDN2_LIBRARY)
368             LIST(APPEND CURL_LIBRARIES ${IDN2_LIBRARY})
369           ENDIF()
371           FIND_LIBRARY(PSL_LIBRARY psl)
372           IF(PSL_LIBRARY)
373             LIST(APPEND CURL_LIBRARIES ${PSL_LIBRARY})
374           ENDIF()
376           FIND_LIBRARY(UNISTRING_LIBRARY unistring)
377           IF(UNISTRING_LIBRARY)
378             LIST(APPEND CURL_LIBRARIES ${UNISTRING_LIBRARY})
379           ENDIF()
381           LIST(APPEND CURL_LIBRARIES ${SECURITY_FRAMEWORK})
382         ENDIF()
383       ENDIF()
384     ENDIF()
385   ENDIF() #hunter
387   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
388   ADD_SUBDIRECTORY(nel)
390   # Aliases for targets
391   SET(NELMISC_LIBRARIES nelmisc)
392   SET(NELNET_LIBRARIES nelnet)
393   SET(NELLIGO_LIBRARIES nelligo)
394   SET(NELGEORGES_LIBRARIES nelgeorges)
395   SET(NEL3D_LIBRARIES nel3d)
396   SET(NELGUI_LIBRARIES nelgui)
397   SET(NELSOUND_LIBRARIES nelsound)
398 ELSE()
399 #  FIND_PACKAGE(NeL COMPONENTS 3d misc pacs sound nimp REQUIRED)
400   FIND_PACKAGE(NeL REQUIRED)
401   INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIRS})
402 ENDIF()
404 IF(WITH_RYZOM)
405   ADD_SUBDIRECTORY(ryzom)
406 ENDIF()
408 IF(WITH_NELNS)
409   ADD_SUBDIRECTORY(nelns)
410 ENDIF()
412 IF(WITH_SNOWBALLS)
413   ADD_SUBDIRECTORY(snowballs2)
414 ENDIF()
416 IF(WITH_TOOLS)
417   ADD_SUBDIRECTORY(tool)
418 ENDIF()
420 IF(WITH_STUDIO)
421   ADD_SUBDIRECTORY(studio)
422 ENDIF()
424 IF(WITH_PERSONAL)
425   ADD_SUBDIRECTORY(personal)
426 ENDIF()
428 # To build the documention, you will have to enable it
429 # and then do the equivalent of "make DoxygenDoc".
430 IF(BUILD_DOCUMENTATION)
431     IF(DOT)
432         SET(HAVE_DOT YES)
433     ELSE()
434         SET(HAVE_DOT NO)
435     ENDIF()
436     # This processes our Doxyfile.in and substitutes paths to generate
437     # a final Doxyfile
438     CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
440     ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
441 ENDIF()
443 IF(WITH_NEL_TESTS)
444   ENABLE_TESTING()
445   ADD_TEST(nel_unit_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nel_unit_test --html)
446   IF(BUILD_DASHBOARD)
447     INCLUDE(Dart)
448     SET(SVNCOMMAND svn)
449     SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
450     SET(GENERATELOGS svn2cl)
451   ENDIF()
452 ENDIF()
454 # packaging information
455 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
456 SET(CPACK_PACKAGE_VENDOR "Ryzom Core")
457 SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README)
458 SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
459 SET(CPACK_PACKAGE_VERSION_MAJOR "${NL_VERSION_MAJOR}")
460 SET(CPACK_PACKAGE_VERSION_MINOR "${NL_VERSION_MINOR}")
461 SET(CPACK_PACKAGE_VERSION_PATCH "${NL_VERSION_PATCH}")
462 SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};NeL;ALL;/")
463 SET(CPACK_PACKAGE_EXECUTABLES "ryzomcore${NL_VERSION}" "ryzomcore")
464 SET(CPACK_SET_DESTDIR TRUE)
466 # NSIS Specific Packing Setup
467 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "RyzomCore")
468 SET(CPACK_NSIS_MODIFY_PATH "ON")
469 SET(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico)
470 SET(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico)
471 SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/resources\\\\nel.bmp)
472 SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} RyzomCore")
473 SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\dev.ryzom.com")
474 SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\dev.ryzom.com\\\\projects\\\\nel\\\\wiki")
475 SET(CPACK_NSIS_CONTACT "matt.raykowski@gmail.com")
477 ## Source Packages
478 SET(CPACK_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}")
479 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "ryzomcore-${NL_VERSION}")
480 IF(WIN32)
481   #SET(CPACK_GENERATOR "NSIS")
482   SET(CPACK_GENERATOR "NSIS;ZIP")
483   SET(CPACK_SOURCE_GENERATOR "ZIP")
484 ELSE()
485   SET(CPACK_GENERATOR "TGZ")
486   SET(CPACK_SOURCE_GENERATOR "TGZ")
487 ENDIF()
488 set(CPACK_SOURCE_IGNORE_FILES
489         "~$"
490         "\\\\.cvsignore$"
491         "^${CMAKE_SOURCE_DIR}.*/CVS/"
492         "^${CMAKE_SOURCE_DIR}.*/\\\\.svn/"
493         "^${CMAKE_SOURCE_DIR}/debian/"
494         "^${CMAKE_SOURCE_DIR}/old/")
495 IF(WIN32)
496   IF(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
497     SET(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
498     IF(WITH_QT)
499       INCLUDE(${QT_USE_FILE})
500       INSTALL(FILES
501         "${QT_LIBRARY_DIR}/../bin/QtGuid4.dll"
502         "${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
503         "${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
504         DESTINATION ${NL_BIN_PREFIX})
505     ENDIF()
506   ELSE()
507     IF(WITH_QT)
508       INCLUDE(${QT_USE_FILE})
509       INSTALL(FILES
510         "${QT_LIBRARY_DIR}/../bin/QtGui4.dll"
511         "${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
512         "${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
513         DESTINATION ${NL_BIN_PREFIX})
514     ENDIF()
515   ENDIF()
517   # Install CEGUI and its dependencies.
518   IF(WITH_NEL_CEGUI)
519     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIBase.dll" DESTINATION ${NL_BIN_PREFIX})
520     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIDevilImageCodec.dll" DESTINATION ${NL_BIN_PREFIX})
521     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIExpatParser.dll" DESTINATION ${NL_BIN_PREFIX})
522     INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
523     INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
524     INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
525   ENDIF()
527   # Only the tools require MFC.
528   IF(WITH_TOOLS)
529     SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
530   ENDIF()
531   #INCLUDE(InstallRequiredSystemLibraries)
532 ENDIF()
534 INCLUDE(CPack)
536 INCLUDE(CMakePackaging.txt)
538 ## Debian Packages
539 #INCLUDE(UseDebian)
540 #IF(DEBIAN_FOUND)
541 #  ADD_DEBIAN_TARGETS(nel)
542 #ENDIF()