2010-05-06 00:08:41 +00:00
|
|
|
PROJECT(NeL CXX C)
|
|
|
|
|
2010-07-14 17:13:07 +00:00
|
|
|
IF(WITH_STATIC_DRIVERS)
|
|
|
|
IF(WIN32)
|
|
|
|
ADD_DEFINITIONS(/DNL_STATIC)
|
|
|
|
ELSE(WIN32)
|
|
|
|
ADD_DEFINITIONS(-DNL_STATIC)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
ENDIF(WITH_STATIC_DRIVERS)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
# On Windows we need to find DirectInput for NLMISC.
|
|
|
|
# This is how we get events.
|
|
|
|
IF(WIN32)
|
|
|
|
FIND_PACKAGE(DirectXSDK)
|
|
|
|
|
|
|
|
# On Win32 we can also build the MAX plugins.
|
|
|
|
IF(WITH_MAXPLUGIN)
|
|
|
|
FIND_PACKAGE(3dsMaxSDK)
|
|
|
|
ENDIF(WITH_MAXPLUGIN)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
IF(WITH_3D)
|
|
|
|
FIND_PACKAGE(FreeType)
|
|
|
|
|
|
|
|
IF(WITH_DRIVER_OPENGL)
|
|
|
|
FIND_PACKAGE(OpenGL)
|
2010-05-12 16:49:59 +00:00
|
|
|
IF(NOT WIN32)
|
2010-05-31 19:32:36 +00:00
|
|
|
IF(APPLE)
|
|
|
|
FIND_LIBRARY(CARBON NAMES Carbon)
|
2010-08-13 16:16:37 +00:00
|
|
|
FIND_LIBRARY(COCOA NAMES Cocoa)
|
|
|
|
ELSE(APPLE)
|
2010-05-31 19:32:36 +00:00
|
|
|
FIND_PACKAGE(X11)
|
|
|
|
FIND_PACKAGE(XF86VidMode)
|
2010-07-12 19:52:35 +00:00
|
|
|
FIND_PACKAGE(XRandR)
|
2010-08-13 16:16:37 +00:00
|
|
|
ENDIF(APPLE)
|
2010-05-12 16:49:59 +00:00
|
|
|
ENDIF(NOT WIN32)
|
2010-05-06 00:08:41 +00:00
|
|
|
ENDIF(WITH_DRIVER_OPENGL)
|
|
|
|
|
|
|
|
IF(WITH_CEGUI)
|
2010-07-12 19:52:35 +00:00
|
|
|
FIND_PACKAGE(CEGUI)
|
2010-05-06 00:08:41 +00:00
|
|
|
ENDIF(WITH_CEGUI)
|
|
|
|
|
|
|
|
ENDIF(WITH_3D)
|
|
|
|
|
|
|
|
IF(WITH_SOUND)
|
2010-07-27 18:23:39 +00:00
|
|
|
FIND_PACKAGE(Ogg)
|
|
|
|
FIND_PACKAGE(Vorbis)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
IF(WITH_DRIVER_OPENAL)
|
|
|
|
FIND_PACKAGE(OpenAL)
|
|
|
|
ENDIF(WITH_DRIVER_OPENAL)
|
|
|
|
|
|
|
|
IF(WITH_DRIVER_FMOD)
|
|
|
|
FIND_PACKAGE(FMOD)
|
|
|
|
ENDIF(WITH_DRIVER_FMOD)
|
|
|
|
ENDIF(WITH_SOUND)
|
|
|
|
|
2010-09-02 09:23:32 +00:00
|
|
|
IF(WITH_MFC)
|
|
|
|
FIND_PACKAGE(MFC)
|
|
|
|
ENDIF(WITH_MFC)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
IF(WITH_GTK)
|
|
|
|
FIND_PACKAGE(GTK2)
|
|
|
|
ENDIF(WITH_GTK)
|
|
|
|
|
2010-09-02 19:53:33 +00:00
|
|
|
IF(WITH_NEL_TESTS)
|
2010-05-06 00:08:41 +00:00
|
|
|
FIND_PACKAGE(CppTest)
|
2010-09-02 19:53:33 +00:00
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
ENABLE_TESTING()
|
|
|
|
ADD_TEST(nel_unit_test ${EXECUTABLE_OUTPUT_PATH}/nel_unit_test --html)
|
|
|
|
IF(BUILD_DASHBOARD)
|
|
|
|
INCLUDE(Dart)
|
|
|
|
SET(SVNCOMMAND svn)
|
2010-07-12 19:52:35 +00:00
|
|
|
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
|
|
|
|
SET(GENERATELOGS svn2cl)
|
2010-05-06 00:08:41 +00:00
|
|
|
ENDIF(BUILD_DASHBOARD)
|
2010-09-02 19:53:33 +00:00
|
|
|
ENDIF(WITH_NEL_TESTS)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
|
|
|
SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
|
2010-06-26 11:27:03 +00:00
|
|
|
SET(libdir "${CMAKE_INSTALL_PREFIX}/lib")
|
|
|
|
SET(includedir "${CMAKE_INSTALL_PREFIX}/include")
|
2010-05-06 00:08:41 +00:00
|
|
|
SET(enable_ligo ${WITH_LIGO})
|
|
|
|
SET(enable_logic ${WITH_LOGIC})
|
|
|
|
SET(enable_georges ${WITH_GEORGES})
|
|
|
|
SET(enable_net ${WITH_NET})
|
|
|
|
SET(enable_3d ${WITH_3D})
|
|
|
|
SET(enable_pacs ${WITH_PACS})
|
|
|
|
SET(enable_sound ${WITH_SOUND})
|
|
|
|
CONFIGURE_FILE(nel-config.in nel-config)
|
|
|
|
|
|
|
|
INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/nel-config DESTINATION bin)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
|
|
|
SET(WINSOCK2_LIB ws2_32.lib)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2010-09-02 19:53:33 +00:00
|
|
|
ADD_SUBDIRECTORY(include)
|
2010-08-28 12:10:56 +00:00
|
|
|
# config.h configuration and use by projects
|
2010-09-03 15:45:59 +00:00
|
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
|
2010-08-28 12:10:56 +00:00
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
|
|
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
ADD_SUBDIRECTORY(src)
|
|
|
|
|
2010-09-02 19:53:33 +00:00
|
|
|
IF(WITH_NEL_SAMPLES)
|
2010-05-06 00:08:41 +00:00
|
|
|
ADD_SUBDIRECTORY(samples)
|
2010-09-02 19:53:33 +00:00
|
|
|
ENDIF(WITH_NEL_SAMPLES)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
2010-09-02 19:53:33 +00:00
|
|
|
IF(WITH_NEL_TOOLS)
|
2010-08-28 12:49:21 +00:00
|
|
|
FIND_PACKAGE(Squish)
|
2010-05-06 00:08:41 +00:00
|
|
|
ADD_SUBDIRECTORY(tools)
|
2010-09-02 19:53:33 +00:00
|
|
|
ENDIF(WITH_NEL_TOOLS)
|