mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-18 23:18:43 +00:00
40 lines
1.5 KiB
CMake
40 lines
1.5 KiB
CMake
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)
|
|
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)
|
|
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)
|
|
ENDIF(WITH_MAXPLUGIN)
|