Page 1 of 1
platform-independent build settings for shared libs?
Posted: Mon Jun 10, 2024 11:57 pm
by amwink
I'm building some shared libraries in Linux, the first versions of which I made in Windows. Their project settings are fairly minimal, I'm using the CodeLite Makefile generator and the Output File was set as lib$(ProjectName).dll
.
In Linux the output file should be lib$(ProjectName).so
. Would it be possible to make some sort of conditional environment variable $(SharedLibExt)
that is set to .dll
on Windows and .so
on Linux?
I'm not quite sure how libraries like OpenBLAS do this, but I guess it's a function in CMake. In CodeLite, its own makefile generator is ever so slightly easier to work with though, so if it can be done without CMake that would be great.
Re: platform-independent build settings for shared libs?
Posted: Sat Jun 15, 2024 9:18 pm
by Jarod42
Alternatively, premake allows to generate stand-alone native Codelite workspace (and it supports natively shared library extension).
Re: platform-independent build settings for shared libs?
Posted: Sun Jun 16, 2024 6:36 pm
by amwink
Interesting! And could I then make a .project
file that would work in CodeLite? or would I need to use premake
to make the project files work?
Re: platform-independent build settings for shared libs?
Posted: Tue Jun 18, 2024 4:01 pm
by Jarod42
By stand-alone, I mean that Premake is unneeded once you have generated the workspace (contrary to CMake which is intrusive and do the build).