Fix
[ryzomcore.git] / CMakeModules / ConfigureChecks.cmake
blob9de2e8214a514cd3c2dadd6e36ce18c93f88dfe8
1 MACRO(NL_CONFIGURE_CHECKS)
2   INCLUDE(GetRevision)
4   # 3D drivers
5   IF(WITH_DRIVER_OPENGL)
6     SET(NL_OPENGL_AVAILABLE 1)
7   ENDIF()
9   IF(WITH_DRIVER_OPENGLES)
10     SET(NL_OPENGLES_AVAILABLE 1)
11   ENDIF()
13   IF(WITH_DRIVER_DIRECT3D)
14     SET(NL_DIRECT3D_AVAILABLE 1)
15   ENDIF()
17   # sound drivers
18   IF(WITH_DRIVER_FMOD)
19     SET(NL_FMOD_AVAILABLE 1)
20   ENDIF()
22   IF(WITH_DRIVER_OPENAL)
23     SET(NL_OPENAL_AVAILABLE 1)
24   ENDIF()
26   IF(WITH_DRIVER_DSOUND)
27     SET(NL_DSOUND_AVAILABLE 1)
28   ENDIF()
30   IF(WITH_DRIVER_XAUDIO2)
31     SET(NL_XAUDIO2_AVAILABLE 1)
32   ENDIF()
34   IF(NOT RYZOM_VERSION_MAJOR)
35     SET(RYZOM_VERSION_MAJOR ${NL_VERSION_MAJOR})
36     SET(RYZOM_VERSION_MINOR ${NL_VERSION_MINOR})
37     SET(RYZOM_VERSION_PATCH ${NL_VERSION_PATCH})
38   ENDIF()
40   IF(DESCRIBE)
41     SET(NL_VERSION "${DESCRIBE}")
42   ELSE()
43     SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
44   ENDIF()
45   SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
46   SET(NL_PRODUCT_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
48   SET(RYZOM_VERSION_SHORT "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}")
49   IF(DESCRIBE)
50     SET(RYZOM_VERSION "${DESCRIBE}")
51   ELSE()
52     SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}")
53   ENDIF()
54   SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
55   SET(RYZOM_PRODUCT_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}")
56   NOW(BUILD_DATE)
58   SET(COPYRIGHT "Copyright (C) ${YEAR} ${AUTHOR}")
60   IF(NOT RYZOM_CLIENT_ICON)
61     SET(RYZOM_CLIENT_ICON "ryzom_client")
62   ENDIF()
64   CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
65   INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
66   ADD_DEFINITIONS(-DHAVE_CONFIG_H)
67 ENDMACRO()