[CMake] Install target problems with visual studio

Alexander Zimmermann a1z at gmx.de
Mon Mar 9 11:38:33 EDT 2009


Hello,

I have some problems while executing the INSTALL-target created from cmake in my visual studio project (VS 2008).

Configuration looks like this:

...
  IF(MSVC)
    INSTALL(TARGETS "MY-lib_shared" "MY-lib_static"
      LIBRARY DESTINATION release/lib/
      RUNTIME DESTINATION release/bin/
      ARCHIVE DESTINATION release/lib/
      CONFIGURATIONS Release)
    INSTALL(TARGETS "MY-lib_shared" "MY-lib_static"
      LIBRARY DESTINATION debug/lib/
      RUNTIME DESTINATION debug/bin/
      ARCHIVE DESTINATION debug/lib/
      CONFIGURATIONS Debug)
  ELSE(MSVC)
...


But during installation the following happens:

-- Install configuration: "Release"
-- Up-to-date: /install-path/release/lib/mylib.lib
-- Installing: /install-path/release/bin/mylib.dll
-- Up-to-date: /install-path/release/lib/mylib.static.lib
-- Installing: /install-path/debug/bin/mylib.dll

-- Install configuration: "Debug"
-- Installing: /install-path/release/bin/mylib.dll
-- Up-to-date: /install-path/debug/lib/mylib.lib
-- Installing: /install-path/debug/bin/mylib.dll
-- Up-to-date: /install-path/debug/lib/mylib.static.lib


In the Release configuration one file is installed to the debug path
and vice versa. So at least one file is overwritten with the wrong contents.

Is it me doing something wrong or is it cmake?

Any help welcome.

Alexander


More information about the CMake mailing list