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

Match BUILD_SHARED_LIBS for add_library targets #154

Open
wants to merge 3 commits into
base: v3
Choose a base branch
from

Conversation

c0ffeeartc
Copy link

Fixes linker error when linking libcocos2d.so with option(BUILD_SHARED_LIBS ON)

@c0ffeeartc c0ffeeartc closed this Jun 2, 2015
@c0ffeeartc c0ffeeartc reopened this Jun 2, 2015
@zilongshanren
Copy link
Member

thanks @c0ffeeartc
Should we change other settings in order to link the libcocos2d.so?

@c0ffeeartc
Copy link
Author

For my system only these fixes were required.

here are options that I had to change temporarily for to compile and link libcocos2d.so:

set(USE_PREBUILT_LIBS_DEFAULT OFF)
if(MINGW)
  set(USE_PREBUILT_LIBS_DEFAULT OFF)
endif()

set(BUILD_CPP_TESTS_DEFAULT OFF)
set(BUILD_LUA_LIBS_DEFAULT  OFF)
set(BUILD_LUA_TESTS_DEFAULT OFF)
set(BUILD_JS_LIBS_DEFAULT   OFF)
set(BUILD_JS_TESTS_DEFAULT  OFF)

option(USE_CHIPMUNK "Use chipmunk for physics library" OFF)
option(USE_BULLET "Use bullet for physics3d library" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

Building with chipmunk, bullet, lua or js may bring other issues. But with above options + fix libcocos2d.so built fine

@zilongshanren
Copy link
Member

@c0ffeeartc maybe we should support building shared libraries for all projects on Linux platform.
But now this feature request doesn't have such high priority.

So I will just leave your PR here. Thanks.

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

Successfully merging this pull request may close these issues.

2 participants