cmake based build: why shared _and_ static?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

cmake based build: why shared _and_ static?

Mario Emmenlauer

Dear geotiff developers,

thanks for the very nice software. A small question: why is the default
for cmake to build the shared and static version of the library? I would
prefer if only one would be built. I can use cmake's BUILD_SHARED_LIBS
option to pick. This is mostly the default for other software.

For me, this would also help to address the problem that MSVC Windows
names the import library identical to the static library by default.
libgeotiff solves this by changing the import library name, but this
opens a can of worms for me downstream.

Its not a huge problem because I can fix the issue myself and maintain
a small patch. But maybe it would be more "standard" if libgeotiff
just used cmake's BUILD_SHARED_LIBS?

All the best,

    Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff

libgeotiff-1.4.2-cmake-use-BUILD_SHARED_LIBS.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cmake based build: why shared _and_ static?

Howard Butler-3

> On Dec 9, 2017, at 7:51 AM, Mario Emmenlauer <[hidden email]> wrote:
>
>
> Dear geotiff developers,
>
> thanks for the very nice software. A small question: why is the default
> for cmake to build the shared and static version of the library? I would
> prefer if only one would be built. I can use cmake's BUILD_SHARED_LIBS
> option to pick. This is mostly the default for other software.
>
> For me, this would also help to address the problem that MSVC Windows
> names the import library identical to the static library by default.
> libgeotiff solves this by changing the import library name, but this
> opens a can of worms for me downstream.
>
> Its not a huge problem because I can fix the issue myself and maintain
> a small patch. But maybe it would be more "standard" if libgeotiff
> just used cmake's BUILD_SHARED_LIBS?
Thanks for the patch Mario. I agree the CMake configuration should build with CMake's current shared library norms, and I have applied it to the repository at https://trac.osgeo.org/geotiff/changeset/2801

If you have more configuration additions, register for an OSGeo ID and continue to add tickets to the GeoTIFF repository with patches. Emailed patches are likely to get lost.

Howard

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cmake based build: why shared _and_ static?

Mario Emmenlauer

Dear Howard,

On 11.12.2017 16:23, Howard Butler wrote:

>> On Dec 9, 2017, at 7:51 AM, Mario Emmenlauer <[hidden email]> wrote:
>> Dear geotiff developers,
>>
>> thanks for the very nice software. A small question: why is the default
>> for cmake to build the shared and static version of the library? I would
>> prefer if only one would be built. I can use cmake's BUILD_SHARED_LIBS
>> option to pick. This is mostly the default for other software.
>>
>> For me, this would also help to address the problem that MSVC Windows
>> names the import library identical to the static library by default.
>> libgeotiff solves this by changing the import library name, but this
>> opens a can of worms for me downstream.
>>
>> Its not a huge problem because I can fix the issue myself and maintain
>> a small patch. But maybe it would be more "standard" if libgeotiff
>> just used cmake's BUILD_SHARED_LIBS?
>
> Thanks for the patch Mario. I agree the CMake configuration should build with CMake's current shared library norms, and I have applied it to the repository at https://trac.osgeo.org/geotiff/changeset/2801
>
> If you have more configuration additions, register for an OSGeo ID and continue to add tickets to the GeoTIFF repository with patches. Emailed patches are likely to get lost.

Thanks a lot, its appreciated! And for my next contribution I'll open
an account :-)

Cheers,

    Mario Emmenlauer

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: cmake based build: why shared _and_ static?

Mario Emmenlauer
In reply to this post by Mario Emmenlauer

Is this an acceptable patch?

On 09.12.2017 14:51, Mario Emmenlauer wrote:

> Dear geotiff developers,
>
> thanks for the very nice software. A small question: why is the default
> for cmake to build the shared and static version of the library? I would
> prefer if only one would be built. I can use cmake's BUILD_SHARED_LIBS
> option to pick. This is mostly the default for other software.
>
> For me, this would also help to address the problem that MSVC Windows
> names the import library identical to the static library by default.
> libgeotiff solves this by changing the import library name, but this
> opens a can of worms for me downstream.
>
> Its not a huge problem because I can fix the issue myself and maintain
> a small patch. But maybe it would be more "standard" if libgeotiff
> just used cmake's BUILD_SHARED_LIBS?
>
> All the best,
>
>     Mario Emmenlauer


All the best,

    Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: cmake based build: why shared _and_ static?

Mario Emmenlauer

Sorry, please forget about my previous email! I confused an older
thread. Thanks for applying the patch, and all the best!

    Mario



On 31.08.2018 16:51, Mario Emmenlauer wrote:

>
> Is this an acceptable patch?
>
> On 09.12.2017 14:51, Mario Emmenlauer wrote:
>> Dear geotiff developers,
>>
>> thanks for the very nice software. A small question: why is the default
>> for cmake to build the shared and static version of the library? I would
>> prefer if only one would be built. I can use cmake's BUILD_SHARED_LIBS
>> option to pick. This is mostly the default for other software.
>>
>> For me, this would also help to address the problem that MSVC Windows
>> names the import library identical to the static library by default.
>> libgeotiff solves this by changing the import library name, but this
>> opens a can of worms for me downstream.
>>
>> Its not a huge problem because I can fix the issue myself and maintain
>> a small patch. But maybe it would be more "standard" if libgeotiff
>> just used cmake's BUILD_SHARED_LIBS?
>>
>> All the best,
>>
>>     Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff