From 385440c86d77139244b362b973ef713217e709f5 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 17 Nov 2014 00:03:47 +0000 Subject: [PATCH] fix cmakelist on windows --- CMakeLists.txt | 9 ++++----- cmake/Win32.cmake | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dedd26..b055589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,10 @@ IF( USE_FFMPEG ) ENDIF() SET_PACKAGE_PROPERTIES(FFmpeg PROPERTIES URL "http://ffmpeg.org/" DESCRIPTION "Libav library support in PlaYUVerStream" TYPE OPTIONAL) +IF( WIN32 ) + INCLUDE( cmake/Win32.cmake ) +ENDIF() + ##################################################################################### # Qt library ###################################################################################### @@ -113,11 +117,6 @@ ADD_SUBDIRECTORY( lib ) ADD_SUBDIRECTORY( modules ) ADD_SUBDIRECTORY( app ) -IF( WIN32 ) - INCLUDE( cmake/Win32.cmake ) -ENDIF() - - ###################################################################################### # Create deb package diff --git a/cmake/Win32.cmake b/cmake/Win32.cmake index fcb44a7..e290e7a 100644 --- a/cmake/Win32.cmake +++ b/cmake/Win32.cmake @@ -2,6 +2,10 @@ # DLLs and Win32 specific code ###################################################################################### +if (MSVC_IDE) + # hack to get around the "Debug" and "Release" directories cmake tries to add on Windows + set_target_properties (${PROJECT_NAME} PROPERTIES PREFIX "../") +endif() SET(MSVC_DLL_DIR "MSVC_DLL_DIR" CACHE PATH "Where to find MSVC dlls") INSTALL(FILES ${MSVC_DLL_DIR}/msvcr120.dll DESTINATION bin )