From 448d55ef0a2d6a0d8a18778f6d6a6a432d05bbb6 Mon Sep 17 00:00:00 2001 From: Sergei Nikulov Date: Tue, 9 Jul 2013 19:20:41 +0400 Subject: cmake: Fix for MSVC2010 project generation Fixed issue with static build for MSVC2010. After some investigation I've discovered known issue http://public.kitware.com/Bug/view.php?id=11240 When .rc file is linked to static lib it fails with following linker error LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 file.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Fix add target property /MACHINE: for MSVC generation. Also removed old workarounds - it caused errors during msvc build. Bug: http://curl.haxx.se/mail/lib-2013-07/0046.html --- src/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bda835779..0b4556f2c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,13 +46,6 @@ target_link_libraries( ${EXE_NAME} libcurl ) set_target_properties(${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") -if(MSVC) - if(NOT BUILD_RELEASE_DEBUG_DIRS) - # Ugly workaround to remove the "/debug" or "/release" in each output - set_target_properties(${EXE_NAME} PROPERTIES PREFIX "../") - endif() -endif() - #INCLUDE(ModuleInstall OPTIONAL) install(TARGETS ${EXE_NAME} DESTINATION bin) -- cgit v1.2.3