[CMake] import library
Brad King
brad.king at kitware.com
Mon Jun 15 10:59:19 EDT 2009
Brad King wrote:
> We'll have to teach CMake to work around the problem. Please
> submit a bug report here:
Nevermind, I've fixed it already. I'll schedule the fix for
release 2.6.5.
> If you really did mean
> to dllexport something, then you need to let VS put the import
> library somewhere. One way to do this is to create the directory
> where CMake tells VS to put the library (this is what our fix to
> CMake will do). In the CMakeLists.txt file containing this line:
Here is a simpler workaround:
IF("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
# VS fails to create the exe's import library directory,
# so tell it to do so.
ADD_CUSTOM_COMMAND(TARGET mecan PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
ENDIF("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
-Brad
More information about the CMake
mailing list