def package_info(self):
    self.cpp_info.names['cmake_find_package'] = 'SDL2'
    self.cpp_info.names['cmake_find_package_multi'] = 'SDL2'
    postfix = ('d' if (self.settings.build_type == 'Debug') else '')
    sdl2_cmake_target = ('SDL2' if self.options.shared else 'SDL2-static')
    self.cpp_info.components['libsdl2'].names['cmake_find_package'] = sdl2_cmake_target
    self.cpp_info.components['libsdl2'].names['cmake_find_package_multi'] = sdl2_cmake_target
    self.cpp_info.components['libsdl2'].includedirs.append(os.path.join('include', 'SDL2'))
    self.cpp_info.components['libsdl2'].libs = [('SDL2' + postfix)]
    if self.options.iconv:
        self.cpp_info.components['libsdl2'].requires.append('libiconv::libiconv')
    if (self.settings.os == 'Linux'):
        self.cpp_info.components['libsdl2'].system_libs = ['dl', 'rt', 'pthread']
        self.cpp_info.components['libsdl2'].requires.append('xorg::xorg')
        if self.options.alsa:
            self.cpp_info.components['libsdl2'].requires.append('libalsa::libalsa')
        if self.options.pulse:
            self.cpp_info.components['libsdl2'].requires.append('pulseaudio::pulseaudio')
        if self.options.opengl:
            self.cpp_info.components['libsdl2'].requires.append('opengl::opengl')
        if self.options.jack:
            self._add_libraries_from_pc('jack')
        if self.options.sndio:
            self._add_libraries_from_pc('sndio')
        if self.options.nas:
            self.cpp_info.components['libsdl2'].system_libs.append('audio')
        if self.options.esd:
            self._add_libraries_from_pc('esound')
        if self.options.directfb:
            self._add_libraries_from_pc('directfb')
        if self.options.video_rpi:
            self.cpp_info.components['libsdl2'].system_libs.append('bcm_host')
            self.cpp_info.components['libsdl2'].includedirs.extend(['/opt/vc/include', '/opt/vc/include/interface/vcos/pthreads', '/opt/vc/include/interface/vmcs_host/linux'])
            self.cpp_info.components['libsdl2'].libdirs.append('/opt/vc/lib')
            self.cpp_info.components['libsdl2'].sharedlinkflags.append('-Wl,-rpath,/opt/vc/lib')
            self.cpp_info.components['libsdl2'].exelinkflags.append('-Wl,-rpath,/opt/vc/lib')
    elif (self.settings.os == 'Macos'):
        self.cpp_info.components['libsdl2'].frameworks = ['Cocoa', 'Carbon', 'IOKit', 'CoreVideo', 'CoreAudio', 'AudioToolbox', 'ForceFeedback']
        if (tools.Version(self.version) >= '2.0.14'):
            self.cpp_info.components['libsdl2'].frameworks.append('Metal')
    elif (self.settings.os == 'Windows'):
        self.cpp_info.components['libsdl2'].system_libs = ['user32', 'gdi32', 'winmm', 'imm32', 'ole32', 'oleaut32', 'version', 'uuid', 'advapi32', 'setupapi', 'shell32']
        if (self.settings.compiler == 'gcc'):
            self.cpp_info.components['libsdl2'].system_libs.append('mingw32')
    if self.options.get_safe('libunwind'):
        self.cpp_info.components['libsdl2'].requires.append('libunwind::libunwind')
    if self.options.sdl2main:
        self.cpp_info.components['sdl2main'].names['cmake_find_package'] = 'SDL2main'
        self.cpp_info.components['sdl2main'].names['cmake_find_package_multi'] = 'SDL2main'
        self.cpp_info.components['sdl2main'].libs = [('SDL2main' + postfix)]
        self.cpp_info.components['sdl2main'].requires = ['libsdl2']
def package_info(self):
    self.cpp_info.names['cmake_find_package'] = 'SDL2'
    self.cpp_info.names['cmake_find_package_multi'] = 'SDL2'
    postfix = ('d' if (self.settings.build_type == 'Debug') else )
    sdl2_cmake_target = ('SDL2' if self.options.shared else 'SDL2-static')
    self.cpp_info.components['libsdl2'].names['cmake_find_package'] = sdl2_cmake_target
    self.cpp_info.components['libsdl2'].names['cmake_find_package_multi'] = sdl2_cmake_target
    self.cpp_info.components['libsdl2'].includedirs.append(os.path.join('include', 'SDL2'))
    self.cpp_info.components['libsdl2'].libs = [('SDL2' + postfix)]
    if self.options.iconv:
        self.cpp_info.components['libsdl2'].requires.append('libiconv::libiconv')
    if (self.settings.os == 'Linux'):
        self.cpp_info.components['libsdl2'].system_libs = ['dl', 'rt', 'pthread']
        self.cpp_info.components['libsdl2'].requires.append('xorg::xorg')
        if self.options.alsa:
            self.cpp_info.components['libsdl2'].requires.append('libalsa::libalsa')
        if self.options.pulse:
            self.cpp_info.components['libsdl2'].requires.append('pulseaudio::pulseaudio')
        if self.options.opengl:
            self.cpp_info.components['libsdl2'].requires.append('opengl::opengl')
        if self.options.jack:
            self._add_libraries_from_pc('jack')
        if self.options.sndio:
            self._add_libraries_from_pc('sndio')
        if self.options.nas:
            self.cpp_info.components['libsdl2'].system_libs.append('audio')
        if self.options.esd:
            self._add_libraries_from_pc('esound')
        if self.options.directfb:
            self._add_libraries_from_pc('directfb')
        if self.options.video_rpi:
            self.cpp_info.components['libsdl2'].system_libs.append('bcm_host')
            self.cpp_info.components['libsdl2'].includedirs.extend(['/opt/vc/include', '/opt/vc/include/interface/vcos/pthreads', '/opt/vc/include/interface/vmcs_host/linux'])
            self.cpp_info.components['libsdl2'].libdirs.append('/opt/vc/lib')
            self.cpp_info.components['libsdl2'].sharedlinkflags.append('-Wl,-rpath,/opt/vc/lib')
            self.cpp_info.components['libsdl2'].exelinkflags.append('-Wl,-rpath,/opt/vc/lib')
    elif (self.settings.os == 'Macos'):
        self.cpp_info.components['libsdl2'].frameworks = ['Cocoa', 'Carbon', 'IOKit', 'CoreVideo', 'CoreAudio', 'AudioToolbox', 'ForceFeedback']
        if (tools.Version(self.version) >= '2.0.14'):
            self.cpp_info.components['libsdl2'].frameworks.append('Metal')
    elif (self.settings.os == 'Windows'):
        self.cpp_info.components['libsdl2'].system_libs = ['user32', 'gdi32', 'winmm', 'imm32', 'ole32', 'oleaut32', 'version', 'uuid', 'advapi32', 'setupapi', 'shell32']
        if (self.settings.compiler == 'gcc'):
            self.cpp_info.components['libsdl2'].system_libs.append('mingw32')
    if self.options.get_safe('libunwind'):
        self.cpp_info.components['libsdl2'].requires.append('libunwind::libunwind')
    if self.options.sdl2main:
        self.cpp_info.components['sdl2main'].names['cmake_find_package'] = 'SDL2main'
        self.cpp_info.components['sdl2main'].names['cmake_find_package_multi'] = 'SDL2main'
        self.cpp_info.components['sdl2main'].libs = [('SDL2main' + postfix)]
        self.cpp_info.components['sdl2main'].requires = ['libsdl2']