-
-
Notifications
You must be signed in to change notification settings - Fork 447
Description
Describe the bugs:
-
Static library name and
Libs:section for static buildWhen building shared, the library file is called
libprojectM-4.so, while building static, the library file is calledlibprojectM.a, instead oflibprojectM-4.a. This seems to be caused by this line. Maybe this is intended, I'm not sure.However, that same CMake code also causes the
Libs:section of the generated .pc files to contain the literal unexpanded CMake generator expression when building statically:-l:$\<IF:$\<PLATFORM_ID:Windows\>,libprojectM,projectM\> -lOpenGL... while it should contain
-l:projectM -lOpenGLor similar. This does not happen when building shared and obviously breaks the .pc file. Removing theset_target_propertiescall fixes the problem, but I'm not sure that's desirable as it seems to be introduced recently.The playlist library .pc file also suffers from this problem, caused by similar code.
-
Cflags:section in .pc file when building staticSince bff9e52, the
PROJECTM_STATIC_DEFINEdefine was moved from atarget_compile_definitionscall to multipleset_source_files_propertiescalls. This has the side effect that-DPROJECTM_STATIC_DEFINEno longer ends up in theCflags:section of the main projectM .pc file when building static.Conversely, the .pc file for the playlist library does contain
-DPROJECTM_STATIC_DEFINE, precisely because it usestarget_compile_definitionshere.Side note: To me, it looks like the playlist library already links against the main projectM library (here), so this line looks unneeded: If the main library correctly specifies the static define as part of it's public interface (which it currently doesn't as explained above) and the playlist library publicly links to the main projectM library (which AFAICT it does), surely the playlist library will inherit and use that flag itself without having to specify it twice.
Finally, maybe a nitpick, but it looks like no .pc files are getting installed when no CMAKE_BUILD_TYPE is specified. Maybe it would be a good idea to default to either one of the four configurations (Debug, RelWithDebInfo, etc) when none is specified?
Desktop:
- OS: linux
- Version: 2d370d3
Metadata
Metadata
Assignees
Labels
Type
Projects
Status