glest / glest-source

Glest is a network multi-player cross-platform 3D real-time strategy (RTS) game, where you create armies of units and battle different factions.
https://glest.io
GNU General Public License v3.0
56 stars 39 forks source link

output library should be renamed #266

Closed andy5995 closed 5 years ago

andy5995 commented 5 years ago

The name of the library should just be "libzetaglest.a" not "liblib..."

[ 42%] Building CXX object source/shared_lib/CMakeFiles/libzetaglest.dir/sources/platform/unix/gl_wrap.cpp.o
[ 43%] Linking CXX static library liblibzetaglest.a
mvilkin commented 5 years ago

Seems like it will conflict with https://github.com/ZetaGlest/zetaglest-source/blob/develop/source/glest_game/CMakeLists.txt#L5

andy5995 commented 5 years ago

hi @mvilkin

Conflict? Oh I meant for the cmake file to be edited, so the library would have different name upon output.

mvilkin commented 5 years ago

Yep, but you will have two targets with the same names.

mvilkin commented 5 years ago

Absolutely. Thx for excellent full explanation!

andy5995 commented 5 years ago

@mathusummut that's a pretty fair assessment, but though things can sometimes appear automatic, there's almost always a way to override.

Logical target names must be globally unique.

Targets names created with add_executable, add_library, or add_custom_target are logical build target names. Logical target names must be globally unique because:

https://cmake.org/cmake/help/v3.7/policy/CMP0002.html?highlight=cmp0002

But this is how it's changed

set_target_properties

Targets can have properties that affect how they are built.

And this is the patch (but let's wait until after the build is fixed to merge it)

https://github.com/ZetaGlest/zetaglest-source/pull/277/files