diff options
-rw-r--r-- | appveyor.yml | 6 | ||||
-rw-r--r-- | infrastructure/cmake/CMakeLists.txt | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/appveyor.yml b/appveyor.yml index 6038314d..6d85e59c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,7 +61,10 @@ install: - 7za x zlib128.zip - cd zlib-1.2.8 - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\zlib-%PLATFORM%" . + # We need to build both versions, debug and release, because cmake requires both to be + # present to generate its multi-configuration project files for Visual Studio/MSBuild. - msbuild INSTALL.vcxproj /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - msbuild INSTALL.vcxproj /m /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd %APPVEYOR_BUILD_FOLDER%\.. - ps: Start-FileDownload "https://www.openssl.org/source/openssl-$($env:OPENSSL_VERSION).tar.gz" @@ -80,7 +83,10 @@ install: - cd pcre-8.38 - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" . - dir + # We need to build both versions, debug and release, because cmake requires both to be + # present to generate its multi-configuration project files for Visual Studio/MSBuild. - msbuild INSTALL.vcxproj /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - msbuild INSTALL.vcxproj /m /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd %APPVEYOR_BUILD_FOLDER%\.. - dir - dir pcre-%PLATFORM% diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt index 7c996dff..ad387347 100644 --- a/infrastructure/cmake/CMakeLists.txt +++ b/infrastructure/cmake/CMakeLists.txt @@ -264,7 +264,9 @@ target_link_libraries(lib_common PUBLIC ws2_32 gdi32) # Link to ZLib include_directories(${base_dir}/../zlib-win32/include) find_library(zlibstaticd_lib_path zlibstaticd ${base_dir}/../zlib-win32/lib) -target_link_libraries(lib_compress PUBLIC ${zlibstaticd_lib_path}) +find_library(zlibstatic_lib_path zlibstatic ${base_dir}/../zlib-win32/lib) +target_link_libraries(lib_compress PUBLIC debug ${zlibstaticd_lib_path}) +target_link_libraries(lib_compress PUBLIC optimized ${zlibstatic_lib_path}) # Link to OpenSSL include_directories(${base_dir}/../openssl-win32/include) @@ -275,9 +277,12 @@ target_link_libraries(lib_crypto PUBLIC ${libeay32_lib_path} ${ssleay32_lib_path # Link to PCRE include_directories(${base_dir}/../pcre-win32/include) target_compile_definitions(lib_common PUBLIC -DPCRE_STATIC) +find_library(pcreposix_lib_path pcreposix ${base_dir}/../pcre-win32/lib) find_library(pcreposixd_lib_path pcreposixd ${base_dir}/../pcre-win32/lib) +find_library(pcre_lib_path pcre ${base_dir}/../pcre-win32/lib) find_library(pcred_lib_path pcred ${base_dir}/../pcre-win32/lib) -target_link_libraries(lib_common PUBLIC "${pcreposixd_lib_path}" "${pcred_lib_path}") +target_link_libraries(lib_common PUBLIC debug "${pcreposixd_lib_path}" optimized "${pcreposix_lib_path}") +target_link_libraries(lib_common PUBLIC debug "${pcred_lib_path}" optimized "${pcre_lib_path}") # Define the location of the Perl executable, needed by testbackupstorefix cmake_to_native_path("${PERL_EXECUTABLE}" perl_executable_native) |