2010-05-06 00:08:41 +00:00
|
|
|
FILE(GLOB SRC *.cpp *.h *.def)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
SET(NLDRV_OGL_LIB "nel_drv_opengl_win")
|
|
|
|
ELSE(WIN32)
|
|
|
|
SET(NLDRV_OGL_LIB "nel_drv_opengl")
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
ADD_LIBRARY(${NLDRV_OGL_LIB} SHARED ${SRC})
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES})
|
|
|
|
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES
|
|
|
|
VERSION ${NL_VERSION}
|
|
|
|
PROJECT_LABEL "Driver, Video: OpenGL")
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
|
|
|
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES COMPILE_FLAGS "/Yustdopengl.h")
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(stdopengl.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopengl.h")
|
|
|
|
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES
|
|
|
|
DEBUG_POSTFIX "_d"
|
|
|
|
RELEASE_POSTFIX "_r"
|
|
|
|
LINK_FLAGS "/NODEFAULTLIB:libcmt")
|
|
|
|
ADD_DEFINITIONS(/DDRIVER_OPENGL_EXPORTS)
|
2010-05-12 16:49:59 +00:00
|
|
|
ELSE(WIN32)
|
|
|
|
IF(XF86VidMode_FOUND)
|
|
|
|
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
|
|
|
|
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
|
|
|
|
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XF86VidMode_LIBRARY})
|
|
|
|
ENDIF(XF86VidMode_FOUND)
|
2010-05-06 00:08:41 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
|
|
|
|
|
|
|
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
|
|
|
IF(WITH_MAXPLUGIN)
|
|
|
|
INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
|
2010-05-12 16:49:59 +00:00
|
|
|
ENDIF(WITH_MAXPLUGIN)
|