|
|
|
@ -4,11 +4,11 @@ IF(NOT WIN32)
|
|
|
|
|
IF(APPLE)
|
|
|
|
|
FIND_LIBRARY(CARBON NAMES Carbon)
|
|
|
|
|
FIND_LIBRARY(COCOA NAMES Cocoa)
|
|
|
|
|
ELSE(APPLE)
|
|
|
|
|
ELSE()
|
|
|
|
|
FIND_PACKAGE(X11)
|
|
|
|
|
FIND_PACKAGE(XF86VidMode)
|
|
|
|
|
ENDIF(APPLE)
|
|
|
|
|
ENDIF(NOT WIN32)
|
|
|
|
|
ENDIF()
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
FILE(GLOB SRC *.cpp *.h *.def)
|
|
|
|
|
|
|
|
|
@ -17,13 +17,13 @@ IF(APPLE)
|
|
|
|
|
SET(SRC ${SRC} ${MAC_SRC})
|
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(${SRC}
|
|
|
|
|
PROPERTIES COMPILE_FLAGS "-x objective-c++")
|
|
|
|
|
ENDIF(APPLE)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
|
SET(NLDRV_OGL_LIB "nel_drv_opengl_win")
|
|
|
|
|
ELSE(WIN32)
|
|
|
|
|
ELSE()
|
|
|
|
|
SET(NLDRV_OGL_LIB "nel_drv_opengl")
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC})
|
|
|
|
|
|
|
|
|
@ -38,12 +38,12 @@ IF(WIN32)
|
|
|
|
|
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
|
|
|
|
ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS)
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
IF(APPLE)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON})
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${COCOA})
|
|
|
|
|
ENDIF(APPLE)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
IF(UNIX AND NOT APPLE)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_X11_LIB})
|
|
|
|
@ -51,41 +51,41 @@ IF(UNIX AND NOT APPLE)
|
|
|
|
|
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
|
|
|
|
|
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XF86VidMode_LIBRARY})
|
|
|
|
|
ENDIF(XF86VidMode_FOUND)
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(X11_Xrandr_FOUND)
|
|
|
|
|
INCLUDE_DIRECTORIES(${X11_Xrandr_INCLUDE_PATH})
|
|
|
|
|
ADD_DEFINITIONS(-DHAVE_XRANDR)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrandr_LIB})
|
|
|
|
|
ENDIF(X11_Xrandr_FOUND)
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(X11_Xrender_FOUND)
|
|
|
|
|
INCLUDE_DIRECTORIES(${X11_Xrender_INCLUDE_PATH})
|
|
|
|
|
ADD_DEFINITIONS(-DHAVE_XRENDER)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrender_LIB})
|
|
|
|
|
ENDIF(X11_Xrender_FOUND)
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(X11_Xcursor_FOUND)
|
|
|
|
|
INCLUDE_DIRECTORIES(${X11_Xcursor_INCLUDE_PATH})
|
|
|
|
|
ADD_DEFINITIONS(-DHAVE_XCURSOR)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB})
|
|
|
|
|
ENDIF(X11_Xcursor_FOUND)
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(X11_Xext_FOUND)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB})
|
|
|
|
|
ENDIF(X11_Xext_FOUND)
|
|
|
|
|
ENDIF()
|
|
|
|
|
# libraries needed to be linked while linking to static X11 libraries
|
|
|
|
|
FIND_LIBRARY(XCB_LIBRARY
|
|
|
|
|
NAMES xcb
|
|
|
|
|
HINTS ${X11_LIB_SEARCH_PATH})
|
|
|
|
|
IF(XCB_LIBRARY)
|
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY})
|
|
|
|
|
ENDIF(XCB_LIBRARY)
|
|
|
|
|
ENDIF(UNIX AND NOT APPLE)
|
|
|
|
|
ENDIF()
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
IF(WITH_PCH)
|
|
|
|
|
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp)
|
|
|
|
|
ENDIF(WITH_PCH)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
|
|
|
|
|
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d)
|
|
|
|
|
IF(WITH_MAXPLUGIN)
|
|
|
|
|
INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
|
|
|
|
|
ENDIF(WITH_MAXPLUGIN)
|
|
|
|
|
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
|
|
|
|
|
ENDIF()
|
|
|
|
|
ENDIF()
|
|
|
|
|