if( WIN32 )
    add_executable( driverinfo_opengl driverinfo_opengl.c )
    target_compile_options( driverinfo_opengl PRIVATE /Zc:wchar_t /Zc:forScope /Wall /WX )
	set_target_properties( driverinfo_opengl PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_opengl opengl32 )
elseif( APPLE )
    find_library( COCOA_LIBRARY Cocoa )
    find_library( OPENGL_LIBRARY OpenGL )
    mark_as_advanced( COCOA_LIBRARY OPENGL_LIBRARY )
    set( EXTRA_LIBS ${COCOA_LIBRARY} ${OPENGL_LIBRARY} )
    add_executable( driverinfo_opengl driverinfo_opengl.c )
    target_compile_options( driverinfo_opengl PRIVATE -std=c99 -x objective-c -fno-objc-arc -Wall -Wno-unused-function -Wno-unused-const-variable )
	set_target_properties( driverinfo_opengl PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_opengl ${EXTRA_LIBS} )
else()
    add_executable( driverinfo_opengl driverinfo_opengl.c )
    target_compile_options( driverinfo_opengl PRIVATE -std=c99 -Wall -Wno-unused-function -Wno-unused-const-variable )
	set_target_properties( driverinfo_opengl PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_opengl m pthread GL ${XLIB_LIBRARIES} ${XCB_LIBRARIES} )
endif()

if( WIN32 )
    add_executable( driverinfo_vulkan driverinfo_vulkan.c )
    target_compile_options( driverinfo_vulkan PRIVATE /Zc:wchar_t /Zc:forScope /Wall /WX )
	set_target_properties( driverinfo_vulkan PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_vulkan )
elseif( APPLE )
    find_library( COCOA_LIBRARY Cocoa )
    mark_as_advanced( COCOA_LIBRARY )
    add_executable( driverinfo_vulkan driverinfo_vulkan.c )
    target_compile_options( driverinfo_vulkan PRIVATE -std=c99 -x objective-c -fno-objc-arc -Wall -Wno-unused-function -Wno-unused-const-variable )
	set_target_properties( driverinfo_vulkan PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_vulkan ${EXTRA_LIBS} )
else()
    add_executable( driverinfo_vulkan driverinfo_vulkan.c )
    target_compile_options( driverinfo_vulkan PRIVATE -std=c99 -Wall -Wno-unused-function -Wno-unused-const-variable )
	set_target_properties( driverinfo_vulkan PROPERTIES FOLDER apps )
    target_link_libraries( driverinfo_vulkan m pthread dl ${XLIB_LIBRARIES} ${XCB_LIBRARIES} )
endif()
