User talk:The Köntzä
My enlightment today on using CMake:
I'm making an app using Microsoft's DDK. The problem that I was facing was related to the fact that cmake wanted to compile a test program which promptly failed as DDK's libraries are not stored as they are in e.g. the free Microsoft Visual C++ Toolkit 2003 + Platform SDK combo.
After trying running cmake -G"NMake Makefiles" this way and that (including waving a rubber chicken at the LCD screen of my Thinkpad) I looked more carefully at the CMakeTestC(XX)Compiler.cmake file in CMake's Modules directory. I found nice variables CMAKE_C(XX)_COMPILER_WORKS.
Now my batch file for invoking CMake looks like this: cmake -G"NMake Makefiles" -DCMAKE_C_COMPILER_WORKS:INTERNAL=TRUE -DCMAKE_CXX_COMPILER_WORKS:INTERNAL=TRUE
CMake is happy as I've told it that my compiler works, and I'm happy because CMake generates the makefile. My cmakelists.txt contain pointers to the DDK's non-standard lib locations.
I just wish that CMake would've read the LINK_DIRECTORIES from cmakelists.txt and used that before throwing in the towel and stating that I have a broken compiler.
-- jussi