I realize that there's probably a huge base already using bullet as it is; and they rely on the libraries being built with mangled named (POSTFIXed '_Debug').
Personally, i have just added this in a chain for my main cmake, so it inherits all my install rules... and I install into different target directories, and never have release and debug in the same directory; but adding bullet with add_subdirectory( ../bullet/source bullet ) mangles all of my library names to get _Debug suffixed to them.
You can set these properties on a per-target basis instead of modifying global behaviors.
(I also had no idea where to start this thread)
Cmake builds mangle library names....
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Cmake builds mangle library names....
The build systems in Bullet as just provided for your convenience, and meant to be customized as you prefer.d3x0r wrote:I realize that there's probably a huge base already using bullet as it is; and they rely on the libraries being built with mangled named (POSTFIXed '_Debug').
Personally, i have just added this in a chain for my main cmake, so it inherits all my install rules... and I install into different target directories, and never have release and debug in the same directory; but adding bullet with add_subdirectory( ../bullet/source bullet ) mangles all of my library names to get _Debug suffixed to them.
You can set these properties on a per-target basis instead of modifying global behaviors.
Do you have a problem customizing cmake? Some people use cmake, others premake, others autotools and others use their own.
The simplest way to use Bullet is to include all source files under Bullet/src to your project and include the Bullet/src to the include path. That should work.
Why didn't you start this thread in the first forum called "General Bullet Physics Support and Feedback"?d3x0r wrote: (I also had no idea where to start this thread)
Your thread is not about a demo, but feedback, right?
-
- Posts: 51
- Joined: Tue Dec 11, 2012 9:59 pm
Re: Cmake builds mangle library names....
It's not that I cannot configure it, it's that I had to do so much to configure it.
But it's done now; I just would think that being a library target primarily, that one would try to avoid setting global properties like CMAKE_XX_POSTFIX....
--- What I added before including bullet ----
#somewhere near the top...
set( BULLET_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../bullet" CACHE STRING "bullet source path " )
#and then later...
IF(EXISTS ${BULLET_SOURCE}/ )
SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Adds a postfix for debug-built libraries.")
SET(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Adds a postfix for MinsizeRelease-built libraries.")
SET(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Adds a postfix for ReleaseWithDebug-built libraries.")
set( USE_GLUT OFF )
set( LIBRARY_OUTPUT_PATH ${CMAKE_INSTALL_PREFIX}/lib )
set( INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES OFF )
set( BUILD_INTEL_OPENCL_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_MINICL_OPENCL_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_CPU_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_DEMOS OFF CACHE BOOL "Bullet option default override" )
add_subdirectory( ${BULLET_SOURCE} bullet )
ENDIF(EXISTS ${BULLET_SOURCE}/ )
-------------------------
It's not a huge deal, and it's done now
But it's done now; I just would think that being a library target primarily, that one would try to avoid setting global properties like CMAKE_XX_POSTFIX....
--- What I added before including bullet ----
#somewhere near the top...
set( BULLET_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../bullet" CACHE STRING "bullet source path " )
#and then later...
IF(EXISTS ${BULLET_SOURCE}/ )
SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Adds a postfix for debug-built libraries.")
SET(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Adds a postfix for MinsizeRelease-built libraries.")
SET(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Adds a postfix for ReleaseWithDebug-built libraries.")
set( USE_GLUT OFF )
set( LIBRARY_OUTPUT_PATH ${CMAKE_INSTALL_PREFIX}/lib )
set( INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES OFF )
set( BUILD_INTEL_OPENCL_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_MINICL_OPENCL_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_CPU_DEMOS OFF CACHE BOOL "Bullet option default override" )
set( BUILD_DEMOS OFF CACHE BOOL "Bullet option default override" )
add_subdirectory( ${BULLET_SOURCE} bullet )
ENDIF(EXISTS ${BULLET_SOURCE}/ )
-------------------------
It's not a huge deal, and it's done now
-
- Posts: 51
- Joined: Tue Dec 11, 2012 9:59 pm
Re: Cmake builds mangle library names....
Would be nice if you didn't set ....
LIBRARY_OUTPUT_PATH
There should really be two phases, a build, and an install, and the build should not be putting products into the install. The way library_output_path is set, you are building product into the install; so if the build doesn't complete, now you have an incomplete package installed and/or partially mangled.
LIBRARY_OUTPUT_PATH
There should really be two phases, a build, and an install, and the build should not be putting products into the install. The way library_output_path is set, you are building product into the install; so if the build doesn't complete, now you have an incomplete package installed and/or partially mangled.