OK, Well, I'm not a windows guy but I have projects that build on windows.
I'll answer some of the easy ones, and end with how I'm currently building bullet:
- Is it right that mingw32-make has to be applied after cmake or does cmake do the whole job on its own?
That is correct. CMake does *not* build your project, it's a fancy cross-platform way of spitting out files so that something else can be used to build your project. eg, it can spit out unix makefiles, xcode projects, visual whatever projects.
- Can someone here give me a step-by-step description of the way how bullet is meant to be built, so that I at least would be able to see, at which step I make a mistake?
Run cmake. Choose your bullet project stuff, choose your build process ["MinGW Makefiles", for example]. Clicky "configure" a couple times. Clicky "generate". Run your build process. Enjoy.
I cannot strongly enough suggest downloading a recent nightly version of cmake for windows - the version you probably have, 2.4.8, suffers a whole host of issues on windows that have impacted me [not with bullet, mind...], and doesn't come with the new & massively improved GUI bit. Available here:
http://www.cmake.org/files/vCVS/
And how should the final result look like?
I suspect you're getting confused. The final output of "bullet" should be a .dll or a .lib on windows. There's nothing to "run", it's a library you link your main project with.
The final output of bullet's
demos is a .exe that links with the .dll or .lib. I have never personally built the .exe on windows, but I don't imagine it's that different.
Will there be a "C:\BulletPhysics" folder? Or is the engine also placed in "C:\.....\bullet-2.67-new" like the source before the build process?
It'll all get dropped into your bullet-2.67-new folder. Where in there will depend on what cmake feels like doing, and what you've explicitly told cmake to do.
Regarding your specific linking problems, you're pretty much just asking for pain using vcproj files. Stick with getting cmake to work for you with mingw32
And finally, *my* project. All the libraries I'm using that are of appropriate size and appropriate license [which bullet is very good for!], I have dropped into a libs/ subdir in my project, and using cmake I explicitly build just the library then linky it with the rest of my project, all managed by cmake. My whole cmake files are pretty complicated, so excerpts are here:
Code: Select all
# libs/bullet/CMakeLists.txt
SET(BULLET_SRCS
# Every C++ src file in bullet is listed here
# If you have nonbraindamaged find command [eg mSyS], it's the output of:
# find . -name \*.cpp
# example lines:
LinearMath/btGeometryUtil.cpp
LinearMath/btQuickprof.cpp
)
ADD_LIBRARY(twbullet ${BULLET_SRCS})
Code: Select all
# Top level CMakeLists.txt
INCLUDE_DIRECTORIES(
# Every dir in bullet is listed here
# If you have nonbraindamaged find command [eg mSyS], it's the output of:
# find libs/bullet/ -type d
# example lines:
libs/bullet/BulletDynamics/Vehicle/
libs/bullet/LinearMath/
)
# This line comes under the above INCLUDE_DIRECTORIES
SUBDIRS(libs/bullet/)
SET(TW_LIBRARIES
twbullet
all_my_other_libraries)
TARGET_LINK_LIBRARIES(TuxWars ${TW_LIBRARIES})
Hope that helps a bit,
Gary (-;