Closed SpaceIm closed 1 year ago
What would your proposed change look like?
Actually in jasper recipe of conan-center, we even disable this JAS_MULTICONFIGURATION_GENERATOR branching.
@theta682 you added this in https://github.com/jasper-software/jasper/commit/0f020fd7. Unfortunately your commit message is quite unhelpful.
But I see that in https://github.com/jasper-software/jasper/pull/301 you actually wrote:
Make CMake code style similar to standard CMake
Improve multi-configuration support: Add "d" suffix for Debug configuration
Improve detection of snprintf on Windows
Use BUILD_SHARED_LIBS to declare JAS_ENABLE_SHARED if it is defined
Reduce warning about GLUT on Windows
Please do one change per commit in the future and describe it.
Anyways, the PR mentions Improve multi-configuration support: Add "d" suffix for Debug configuration
. @theta682 what do you think about @SpaceIm suggestion here?
In the case of "multi-configuration" debug suffix is required. CPack which uses CMake install will replace all configurations with the last one. There is no way to package both configurations at once. For preparing a separate debug package it is better to use nonmulti-configuration. I am strongly against removing the debug suffix when multi-configuration is used.
@jubalh: Based on the comments from @theta682, I would be inclined to leave JasPer unchanged in the above regard. Should I close this issue?
This makes things harder for package managers (we would have to patch forever in conan just because a user has a very specific and unusual usage of the build system of library :s ). I never seen such weird name logic in any CMake based project. Debug suffix based on compiler, yes (but honestly it's a pain), but it doesn't make sense when it depends on generator.
@SpaceIm if you package using multi-configuration you must support multiple files. Don't use multi-configuration generator.
After more thought, I can agree with @SpaceIm that CMAKE_DEBUG_POSTFIX
can be provided externally. See #351.
Thanks @theta682 for the patch and @SpaceIm for the discussion.
Thank you all @theta682 @SpaceIm @jubalh
Generators are an internal detail of users, lib name shouldn't depend on it. Currently a
d
postifx is added to debug lib name in case of multi config generator. It makes lib name & packaging content unpredictable for conan package manager for a given tuple of compiler/os/arch/build type.