btogre icon indicating copy to clipboard operation
btogre copied to clipboard

cmake-targets.patch to build shared libraries

Open martinkg opened this issue 10 years ago • 6 comments

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 ?

martinkg avatar Jan 11 '15 18:01 martinkg

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

svenstaro avatar Jan 11 '15 22:01 svenstaro

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

martinkg avatar Jan 12 '15 09:01 martinkg

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

svenstaro avatar Jan 13 '15 02:01 svenstaro

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

martinkg avatar Jan 13 '15 09:01 martinkg

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

svenstaro avatar Jan 13 '15 20:01 svenstaro

Linking it statically doesn't make it bundled?

jacmoe avatar Feb 03 '15 23:02 jacmoe