CuarzoSoftware / SRM

Simple Rendering Manager
MIT License
53 stars 5 forks source link

build: heed results from pkg-config #7

Closed jengelh closed 11 months ago

jengelh commented 11 months ago

The .pc files can have extra required flags or locations (e.g. if libraries are installed outside the standard search paths).

ehopperdietzel commented 11 months ago

Thank you very much! I'll run some tests before merging your changes. Based on past experiences, it seems that other users haven't encountered issues with building and installing it. Are you currently attempting to build RPM packages? Additionally, I'm not particularly well-versed in pkg-config, so are you suggesting that I need to create a .pc file containing include paths and other configurations? While exploring the Wayland meson.build file for guidance, I noticed they use the following approach:

pkgconfig.generate(
        wayland_client,
        name: 'Wayland Client',
        description: 'Wayland client side library',
        version: meson.project_version(),
        filebase: 'wayland-client',
        variables: [
            'datarootdir=' + join_paths('${prefix}', get_option('datadir')),
            'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name())
        ]
    )

Does this generate the .pc file, which is then installed?

ehopperdietzel commented 11 months ago

Thanks, I merged the changes, removed the ld.sh script and also added pkg.generate() in meson.build, so now pkg-config can find it.

jengelh commented 11 months ago

other users haven't encountered issues with building and installing it

low usercount.

are you suggesting that I need to create a .pc file

could be useful for louvre, but not a requirement.

ehopperdietzel commented 11 months ago

Thanks again, I have one more question, do you think it is a good idea to install headers in /usr/include/SRM now that I am using pkgconfig, should I let meson choose the path? And, do you know how to get the path that meson uses by default?

ehopperdietzel commented 11 months ago

I think default_headers_install_path = join_paths(get_option('prefix'), get_option('includedir')) does the job.