Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake-targets.patch to build shared libraries #6

Open
martinkg opened this issue Jan 11, 2015 · 6 comments
Open

cmake-targets.patch to build shared libraries #6

martinkg opened this issue Jan 11, 2015 · 6 comments

Comments

@martinkg
Copy link

it exists on http://devel.japh.se/aur/btogre-git/cmake-targets.patch a patch, with it btogre builds with a static library (/usr/lib/libBtOgre.a.)

I tried to build btogre with shared libraries (/usr/lib64/libbtogre.so.1.0), but i don't know how to
patch CMakeLists.txt.

Only what i know is, that there must something in CMakeLists.txt like this, but i am not a programmer.

set(BtOgre_MAJOR_VERSION 1)
set(BtOgre_MINOR_VERSION 0)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
if(BUILD_SHARED_LIBS)
set(BtOgre_LIBRARY_TYPE SHARED)
else(BUILD_SHARED_LIBS)
set(BtOgre_LIBRARY_TYPE STATIC)
endif(BUILD_SHARED_LIBS)

set(BtOgre_LIBRARY "BtOgre")

file(GLOB BtOgre_HEADERS "${PROJECT_SOURCE_DIR}/include/*.h")

set_target_properties(BtOgre PROPERTIES PUBLIC_HEADER "${BtOgre_HEADERS}")

set_target_properties(${BtOgre_LIBRARY} PROPERTIES SOVERSION "${BtOgre_MAJOR_VERSION}.${BtOgre_MINOR_VERSION}")

if(BUILD_SHARED_LIBS)
install(TARGETS ${BtOgre_LIBRARY}
LIBRARY DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION lib${LIB_SUFFIX})
else(BUILD_SHARED_LIBS)
install(TARGETS ${BtOgre_LIBRARY}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
RUNTIME DESTINATION lib${LIB_SUFFIX})
endif(BUILD_SHARED_LIBS)

can you help me ?

@svenstaro
Copy link
Collaborator

Wait, what. What do you want to do and why?

@martinkg
Copy link
Author

i want to unbundle btogre from stuntrally, because bundled libraries are not allowed in Fedora packages.
https://github.com/ignatenkobrain/tasks/issues/19

@svenstaro
Copy link
Collaborator

Well what's the relation to this repo then? Make them unbundle it.

@martinkg
Copy link
Author

I have no relation with any repo, i only want to unbundle btogre from stundrally.

@svenstaro
Copy link
Collaborator

As far as I'm aware, the recommended way of using btogre is by actually linking it statically because it is so small.

@jacmoe
Copy link

jacmoe commented Feb 3, 2015

Linking it statically doesn't make it bundled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants