Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists.txt: Install pkgconfig files again #971

Closed
wants to merge 1 commit into from
Closed

CMakeLists.txt: Install pkgconfig files again #971

wants to merge 1 commit into from

Conversation

nmeum
Copy link
Contributor

@nmeum nmeum commented May 31, 2020

@Nightwalker-87
Copy link
Member

@chenguokai: Any ideas on this?

@chenguokai
Copy link
Collaborator

I am not familiar with pkgconfig. Neutral on this topic.

@Vascom
Copy link
Collaborator

Vascom commented Jun 1, 2020

Need to move string
set(STLINK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Main library install directory")
before

## Package configuration (pkg-config) on unix-based systems
if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
    add_subdirectory(cmake/pkgconfig)
    find_package(PkgConfig)
    pkg_check_modules(GTK3 gtk+-3.0)
endif ()

@Nightwalker-87
Copy link
Member

Well the cmake find_package package config thingy (cmake-packages(7)) and pkg-config are two entirely different things. The former can only be used with CMake, the latter also with other build systems (e.g. GNU make).

@nmeum: Does it even work with GNU make? The whole build procedure for this project is setup with cmake (this is why it is also required for compilation). The top-level makefile only refers to the cmake subroutine...

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Jun 1, 2020

@Vascom: ok, but find_package(PkgConfig) should go somewhere else then if not related to pkgconfig. I'll move the cited block further to the end of the top-level CMakeLists.txt, to achieve this order without breaking with the reorganised cmake build settings again.

@Nightwalker-87 Nightwalker-87 added this to the v1.6.2 milestone Jun 1, 2020
@Vascom
Copy link
Collaborator

Vascom commented Jun 1, 2020

@Vascom: ok, but find_package(PkgConfig) should go somewhere else then if not related to pkgconfig. I'll move the cited block further to the end of the top-level CMakeLists.txt, to achieve this order without breaking with the reorganised cmake build settings again.

OK

@nmeum
Copy link
Contributor Author

nmeum commented Jun 1, 2020

@nmeum: Does it even work with GNU make? The whole build procedure for this project is setup with cmake (this is why it is also required for compilation).

Are we are talking about the same thing? I mean stlink shoulid install the stlink.pc file (as it did previously, i.e. in 1.6.0). Without my PR it doesn't install that file. Thepkgconfig.pc file is used by pkg-config and allows developers to find the correct compiler options when building applications depending on stlink, i.e. applications linking against libstlink.

@Nightwalker-87
Copy link
Member

@nmeum: This is the definition of the cmake module, which is also called: https://cmake.org/cmake/help/latest/module/FindPkgConfig.html As far as I read this, it calls the same application.
To me it would be important to know if:

  1. both are in conflict
  2. there ever was any integration of libstlink into external applications, because we don't have ANY documentation on that library itself within this project yet (apart from the very basic and tentative /doc/developer.txt). I can remember a ticket request once that was never addressed due to missing interest.

If the second point is the case, we would need to look at way more things than pkg-config, if not I don't see the use case yet (for both versions actually) against the missing documentation, well knowing one approach was present before. Please let me know more about the current scenario to let us implement a complete and fully usable solution instead of puzzled pieces.

@nmeum
Copy link
Contributor Author

nmeum commented Jun 1, 2020

Ok, if libstlink is not intended to be used by applications anyhow than this can be closed :)

@nmeum nmeum closed this Jun 1, 2020
@Nightwalker-87 Nightwalker-87 removed their request for review June 1, 2020 21:54
@Nightwalker-87
Copy link
Member

Related to #800.

@Nightwalker-87
Copy link
Member

I would propose to move the pkg-config settings to a config-textfile in /doc until a proper solution is implemented in form of a documented API. With this the current "puzzle-bit" remains available for developers who fancy to play with it on a pre-alpha-level, just as the /doc/developer.txt file and we don't need to worry about anything very rarely used and not currently supported.

@Nightwalker-87 Nightwalker-87 modified the milestone: v1.6.2 Jun 1, 2020
@Nightwalker-87
Copy link
Member

@Vascom: Nevertheless I'll consider your feedback there. I hope this is also an acceptable solution for @nmeum so that we do not need to wipe this issue away. Also we should still make sure both mentioned approaches are compatible.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants