[Cmake] Reconciling MD, MDd, MT, MTd libraries

Chris Scharver scharver at evl.uic.edu
Wed May 7 17:50:22 EDT 2003


Hello,

I am running CMake 1.6.6, and it cannot automatically locate my library file. There are several different libraries available for different code generation styles, and I wonder if that's why things are a little strange.

C:\VRCO\CAVELib_3.0.3\lib32\libcave_ogl_mt_[MD MDd MT MTd].lib

No matter which library I try to have CMake find, the file is never found. The result is always CAVE_cave_LIBRARY-NOTFOUND.

  SET (CAVE_HOME "$ENV{CAVE_HOME}")
  FIND_LIBRARY(CAVE_cave_LIBRARY cave_ogl_mt_MTd
    ${CAVE_HOME}/lib32
  }

I know the environment variable is being read properly because the header is found without any trouble. Is the extra ending on the library possibly to blame? I tried removing it but still just got CAVE_cave_LIBRARY-NOTFOUND. I can use CMake to set it manually, but then I still have to go change code generation settings to match. I also need to manually set the /MTd switch in order to avoid link errors. Is there an easy way to do that from the CMakeLists.txt file so that it's automatic? Is there an easy way to choose which setting to use and have the appropriate library linked against?

Thanks,
Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>



More information about the CMake mailing list