<commit_before>
# FIXME: For OS X, need flag for Framework or dylib
IF   (DYNAMIC_OPENSCENEGRAPH)
	ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
	ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF(DYNAMIC_OPENSCENEGRAPH)

SET(LIB_NAME osgViewer)
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(LIB_PUBLIC_HEADERS
	${HEADER_PATH}/CompositeViewer
	${HEADER_PATH}/Export
	${HEADER_PATH}/GraphicsWindow
	${HEADER_PATH}/HelpHandler
	${HEADER_PATH}/Scene
	${HEADER_PATH}/SimpleViewer
	${HEADER_PATH}/StatsHandler
	${HEADER_PATH}/Version
	${HEADER_PATH}/View
	${HEADER_PATH}/Viewer
)

SET(LIB_PRIVATE_HEADERS
	${HEADER_PATH}/GraphicsWindowCarbon
	${HEADER_PATH}/GraphicsWindowCocoa
	${HEADER_PATH}/GraphicsWindowWin32
	${HEADER_PATH}/GraphicsWindowX11
)

SET(LIB_COMMON_FILES
	CompositeViewer.cpp
	Scene.cpp
	SimpleViewer.cpp
	StatsHandler.cpp
	HelpHandler.cpp
	Version.cpp
	View.cpp
	Viewer.cpp
)


IF(WIN32)
	ADD_LIBRARY(${LIB_NAME}
		${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
		${LIB_PUBLIC_HEADERS}
		${LIB_PRIVATE_HEADERS}
		${LIB_COMMON_FILES}
		GraphicsWindowWin32.cpp
	)
ELSE(WIN32)
	IF(APPLE)
		# FIXME: OS X needs selection mechanism for Cocoa, Carbon, X11
		ADD_LIBRARY(${LIB_NAME}
			${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
			${LIB_PUBLIC_HEADERS}
			${LIB_PRIVATE_HEADERS}
			${LIB_COMMON_FILES}
			GraphicsWindowCarbon.cpp
		)
	ELSE(APPLE)
		# X11 for everybody else
		ADD_LIBRARY(${LIB_NAME}
			${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
			${LIB_PUBLIC_HEADERS}
			${LIB_PRIVATE_HEADERS}
			${LIB_COMMON_FILES}
			GraphicsWindowX11.cpp
		)
	ENDIF(APPLE)
ENDIF(WIN32)

	

TARGET_LINK_LIBRARIES(${LIB_NAME}
	osgGA
	osgText
	osgDB
	osgUtil
	osg
	${OPENTHREADS_LIBRARY}
	${OPENGL_LIBRARIES}
)

INCLUDE(ModuleInstall OPTIONAL)<commit_msg>From <NAME>, added gdi32 entry fro Mingw build<commit_after>
# FIXME: For OS X, need flag for Framework or dylib
IF   (DYNAMIC_OPENSCENEGRAPH)
	ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY)
ELSE (DYNAMIC_OPENSCENEGRAPH)
	ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF(DYNAMIC_OPENSCENEGRAPH)

SET(LIB_NAME osgViewer)
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(LIB_PUBLIC_HEADERS
	${HEADER_PATH}/CompositeViewer
	${HEADER_PATH}/Export
	${HEADER_PATH}/GraphicsWindow
	${HEADER_PATH}/HelpHandler
	${HEADER_PATH}/Scene
	${HEADER_PATH}/SimpleViewer
	${HEADER_PATH}/StatsHandler
	${HEADER_PATH}/Version
	${HEADER_PATH}/View
	${HEADER_PATH}/Viewer
)

SET(LIB_PRIVATE_HEADERS
	${HEADER_PATH}/GraphicsWindowCarbon
	${HEADER_PATH}/GraphicsWindowCocoa
	${HEADER_PATH}/GraphicsWindowWin32
	${HEADER_PATH}/GraphicsWindowX11
)

SET(LIB_COMMON_FILES
	CompositeViewer.cpp
	Scene.cpp
	SimpleViewer.cpp
	StatsHandler.cpp
	HelpHandler.cpp
	Version.cpp
	View.cpp
	Viewer.cpp
)


IF(WIN32)
	ADD_LIBRARY(${LIB_NAME}
		${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
		${LIB_PUBLIC_HEADERS}
		${LIB_PRIVATE_HEADERS}
		${LIB_COMMON_FILES}
		GraphicsWindowWin32.cpp
	)
ELSE(WIN32)
	IF(APPLE)
		# FIXME: OS X needs selection mechanism for Cocoa, Carbon, X11
		ADD_LIBRARY(${LIB_NAME}
			${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
			${LIB_PUBLIC_HEADERS}
			${LIB_PRIVATE_HEADERS}
			${LIB_COMMON_FILES}
			GraphicsWindowCarbon.cpp
		)
	ELSE(APPLE)
		# X11 for everybody else
		ADD_LIBRARY(${LIB_NAME}
			${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
			${LIB_PUBLIC_HEADERS}
			${LIB_PRIVATE_HEADERS}
			${LIB_COMMON_FILES}
			GraphicsWindowX11.cpp
		)
	ENDIF(APPLE)
ENDIF(WIN32)

	

TARGET_LINK_LIBRARIES(${LIB_NAME}
	osgGA
	osgText
	osgDB
	osgUtil
	osg
	${OPENTHREADS_LIBRARY}
	${OPENGL_LIBRARIES}
)

IF(MINGW)
    TARGET_LINK_LIBRARIES(${LIB_NAME}
        gdi32
    )
ENDIF(MINGW)

INCLUDE(ModuleInstall OPTIONAL)
{'fraction_non_alphanumeric': 0.10223298358891579, 'fraction_numerical': 0.010761366693570083, 'mean_word_length': 6.495967741935484, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5873312', 'n_tokens_mistral': 1702, 'n_tokens_neox': 1510, 'n_words': 200}