From 202aa6314f24b4777821dd926442d6f8de21b93e Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 2 Sep 2016 18:00:19 +0300 Subject: [PATCH] Regression fixed. Introduced in e94a91ba7e5e1ef21b2040e1cacb957100d435be. Leads to 'dependency library not found' for dlls on windows. --- ValaLibCommonRules.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ValaLibCommonRules.cmake b/ValaLibCommonRules.cmake index e0cdcc5..8192a50 100644 --- a/ValaLibCommonRules.cmake +++ b/ValaLibCommonRules.cmake @@ -8,6 +8,13 @@ IF (NOT LibNoApi) SET (generate_header ${LibName}-${MAJOR}) ENDIF (NOT LibNoApi) + +IF (WIN32) + IF (NOT LibIsPlugin) + SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/run") # Avoid of "dll not found" messages + ENDIF (NOT LibIsPlugin) +ENDIF (WIN32) + VALA_PRECOMPILE (VALA_C ${LibSources} PACKAGES ${LibPackages} OPTIONS --thread ${LibValaOpts} ${VALA_DEBUG} ${export_vaapi} @@ -24,9 +31,6 @@ SET_TARGET_PROPERTIES (${LibName} PROPERTIES VERSION ${MAJOR}.${MINOR}.${PATCH}) SET_TARGET_PROPERTIES (${LibName} PROPERTIES SOVERSION ${MAJOR}) IF (WIN32) - IF (NOT LibIsPlugin) - SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/run") # Avoid of "dll not found" messages - ENDIF (NOT LibIsPlugin) SET_TARGET_PROPERTIES (${LibName} PROPERTIES PREFIX "" IMPORT_PREFIX "" SUFFIX "-${MAJOR}.dll" IMPORT_SUFFIX "-${MAJOR}.dll.a") ENDIF (WIN32)