Re: [flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread Martijn van Beurden
I've added the following to Windows-MSVC.cmake, which I copied from
Windows-GNU.cmake

set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_MODULE_PREFIX  "lib")
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")

When I do that, I still get the same warning:

libogg.exp : warning LNK4070: /OUT:ogg.dll directive in .EXP differs
from output filename
'C:\Users\m_van\flac\build\objs\Release\libogg.dll'; ignoring
directive

So, apparently either CMake or MSVC is forgetting to rename something,
somewhere.

Op wo 7 jun 2023 om 05:11 schreef Dave Yeo :
>
> On 06/06/23 02:33 AM, m b wrote:
> > Hi,
> >
> > I use CMake to generate FLAC dynamic link library projects for Visual
> > Studio, in the CMake user interface window, the "BUILD_SHARED_LIBS" is
> > enabled. The CMake generates the FLAC and ogg dynamic library projects.
> >  The Visual Studio builds the FLAC.dll and ogg.dll, and the FLAC.dll
> > depends on ogg.dll.
> >
> > However, in my previous projects, the file name of the dynamic library
> > for ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required
> > ogg.dll, I have to make a copy of libogg.ll and rename it to ogg.dll,
> > they are duplicate files. So I want the CMake-generated project file
> > name is libogg, not ogg. I check the CMakeLists.txt and confilgure file
> > in flac-1.4.2, and don't find how to change ogg project name to libogg.
> >
>
> Might have to figure out where cmake is installed on Windows, find the
> file Modules\Platform\Windows.cmake and edit the line
> set(CMAKE_SHARED_LIBRARY_PREFIX "")  # lib
> to
> SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
> Which will of course cause all DLL's to have the lib prefix.
> Might be a different Platform file to edit too as I'm making assumptions
> and haven't actually tested, no Windows here.
> Dave
> ___
> flac-dev mailing list
> flac-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread Dave Yeo

On 06/06/23 02:33 AM, m b wrote:

Hi,

I use CMake to generate FLAC dynamic link library projects for Visual
Studio, in the CMake user interface window, the "BUILD_SHARED_LIBS" is
enabled. The CMake generates the FLAC and ogg dynamic library projects.
 The Visual Studio builds the FLAC.dll and ogg.dll, and the FLAC.dll
depends on ogg.dll.

However, in my previous projects, the file name of the dynamic library
for ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required
ogg.dll, I have to make a copy of libogg.ll and rename it to ogg.dll,
they are duplicate files. So I want the CMake-generated project file
name is libogg, not ogg. I check the CMakeLists.txt and confilgure file
in flac-1.4.2, and don't find how to change ogg project name to libogg.



Might have to figure out where cmake is installed on Windows, find the 
file Modules\Platform\Windows.cmake and edit the line

set(CMAKE_SHARED_LIBRARY_PREFIX "")  # lib
to
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
Which will of course cause all DLL's to have the lib prefix.
Might be a different Platform file to edit too as I'm making assumptions 
and haven't actually tested, no Windows here.

Dave
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread Martijn van Beurden
Yes, I've tried that, and libogg.dll and libogg.obj get produced, but I
also het a linker warning that libogg.exp contains an out directive that is
not consistent, as it points to ogg.dll. So, the files get renamed, but the
'pointer' stays the same. Seems like a bug in either Visual Studio or
CMake, but I can't seem to find about it on Google.

Op di 6 jun. 2023 21:39 schreef LRN :

> On 06.06.2023 22:33, Martijn van Beurden wrote:
> > Hi,
> >
> > This rabbit hole went quite a bit deeper than I expected. Apparently,
> > CMake prepends 'lib' to library names for unix like environments
> > (including MinGW) but not for Visual Studio. So, when building on
> > Windows, you get either libFLAC.dll and libogg.dll or FLAC.dll and
> > ogg.dll depending on what toolchain you're using. I'm not quite sure
> > whether this makes sense. I've tried quite a few ways to override this
> > behaviour, but the most obvious solutions didn't work.
> >
> > Sorry, I've been trying various things for two hours today, I give up.
> > Perhaps someone else on this list knows the answer.
> >
>
> set_target_properties(foobar PROPERTIES
>   SOVERSION ${SO_MAJOR_VERSION} VERSION ${SO_VERSION}
>   OUTPUT_NAME foobar
>   RUNTIME_OUTPUT_NAME foobar-${SO_MAJOR_VERSION}
>   ARCHIVE_OUTPUT_NAME foobar)
>
> Something like that. This should produce libfoobar-X, where X is the
> SO_MAJOR_VERSION value.
>
> --
> O< ascii ribbon - stop html email! - www.asciiribbon.org
>
> ___
> flac-dev mailing list
> flac-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
>
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread LRN

On 06.06.2023 22:33, Martijn van Beurden wrote:

Hi,

This rabbit hole went quite a bit deeper than I expected. Apparently,
CMake prepends 'lib' to library names for unix like environments
(including MinGW) but not for Visual Studio. So, when building on
Windows, you get either libFLAC.dll and libogg.dll or FLAC.dll and
ogg.dll depending on what toolchain you're using. I'm not quite sure
whether this makes sense. I've tried quite a few ways to override this
behaviour, but the most obvious solutions didn't work.

Sorry, I've been trying various things for two hours today, I give up.
Perhaps someone else on this list knows the answer.



set_target_properties(foobar PROPERTIES
 SOVERSION ${SO_MAJOR_VERSION} VERSION ${SO_VERSION}
 OUTPUT_NAME foobar
 RUNTIME_OUTPUT_NAME foobar-${SO_MAJOR_VERSION}
 ARCHIVE_OUTPUT_NAME foobar)

Something like that. This should produce libfoobar-X, where X is the 
SO_MAJOR_VERSION value.


--
O< ascii ribbon - stop html email! - www.asciiribbon.org



OpenPGP_signature
Description: OpenPGP digital signature
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


Re: [flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread Martijn van Beurden
Hi,

This rabbit hole went quite a bit deeper than I expected. Apparently,
CMake prepends 'lib' to library names for unix like environments
(including MinGW) but not for Visual Studio. So, when building on
Windows, you get either libFLAC.dll and libogg.dll or FLAC.dll and
ogg.dll depending on what toolchain you're using. I'm not quite sure
whether this makes sense. I've tried quite a few ways to override this
behaviour, but the most obvious solutions didn't work.

Sorry, I've been trying various things for two hours today, I give up.
Perhaps someone else on this list knows the answer.

Kind regards,

Martijn van Beurden

Op di 6 jun 2023 om 11:33 schreef m b :

>
> Hi,
>
> I use CMake to generate FLAC dynamic link library projects for Visual Studio, 
> in the CMake user interface window, the "BUILD_SHARED_LIBS" is enabled. The 
> CMake generates the FLAC and ogg dynamic library projects.  The Visual Studio 
> builds the FLAC.dll and ogg.dll, and the FLAC.dll depends on ogg.dll.
>
> However, in my previous projects, the file name of the dynamic library for 
> ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required ogg.dll, I have 
> to make a copy of libogg.ll and rename it to ogg.dll, they are duplicate 
> files. So I want the CMake-generated project file name is libogg, not ogg. I 
> check the CMakeLists.txt and confilgure file in flac-1.4.2, and don't find 
> how to change ogg project name to libogg.
>
> Thank you for your help!
>
> Regards,
> Mike
> ___
> flac-dev mailing list
> flac-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


[flac-dev] How to change the dynamic library project name ogg to libogg?

2023-06-06 Thread m b
Hi,

 

I use CMake to generate FLAC dynamic link library projects for Visual Studio, in the CMake user interface window, the "BUILD_SHARED_LIBS" is enabled. The CMake generates the FLAC and ogg dynamic library projects.  The Visual Studio builds the FLAC.dll and ogg.dll, and the FLAC.dll depends on ogg.dll. 

 

However, in my previous projects, the file name of the dynamic library for ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required ogg.dll, I have to make a copy of libogg.ll and rename it to ogg.dll, they are duplicate files. So I want the CMake-generated project file name is libogg, not ogg. I check the CMakeLists.txt and confilgure file in flac-1.4.2, and don't find how to change ogg project name to libogg.

 

Thank you for your help!

 

Regards,
Mike
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev