ADD_DEFINITIONS(-DBUILDING_WITH_CMAKE=1)
ADD_DEFINITIONS(-DHAVE_CONFIG_H=1)

IF (WTF_OS_UNIX)
    ADD_DEFINITIONS(-DXP_UNIX)
ENDIF (WTF_OS_UNIX)

IF (MSVC)
    # FIXME: Some codegenerators don't support paths with spaces. So use the executable name only.
    GET_FILENAME_COMPONENT(CODE_GENERATOR_PREPROCESSOR_EXECUTABLE ${CMAKE_CXX_COMPILER} NAME)
    SET(CODE_GENERATOR_PREPROCESSOR "${CODE_GENERATOR_PREPROCESSOR_EXECUTABLE} /nologo /EP")
ELSEIF (CMAKE_SYSTEM_NAME MATCHES QNX)
    SET(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -Wp,-P -x c++")
ELSE ()
    SET(CODE_GENERATOR_PREPROCESSOR "${CMAKE_CXX_COMPILER} -E -P -x c++")
ENDIF ()

IF (ENABLE_WEBGL)
    FIND_PACKAGE(OpenGL REQUIRED)
ENDIF ()
