[Cmake] Reconciling MD, MDd, MT, MTd libraries
William A. Hoffman
bill.hoffman@kitware.com
Sun, 11 May 2003 21:46:16 -0400
That should work.
You can do something like this so that it will
find any one of them:
FIND_LIBRARY(CAVE_cave_LIBRARY
NAMES cave_ogl_mt_MDd cave_ogl_mt_MD cave_ogl_mt_MT cave_ogl_mt_MTd
PATHS ${CAVE_HOME}/lib32
DOC "Path to cave library")
-Bill
At 04:50 PM 5/7/2003 -0500, Chris Scharver wrote:
>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/>
>_______________________________________________
>Cmake mailing list
>Cmake@public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake