Browse Source

libarchive: Set build options the way we need for CMake

Brad King 3 months ago
parent
commit
3c91d4427d
2 changed files with 3 additions and 0 deletions
  1. 1 0
      Source/Modules/CMakeBuildUtilities.cmake
  2. 2 0
      Utilities/cmlibarchive/CMakeLists.txt

+ 1 - 0
Source/Modules/CMakeBuildUtilities.cmake

@@ -297,6 +297,7 @@ else()
   set(ENABLE_TEST OFF)
   set(ENABLE_COVERAGE OFF)
   set(ENABLE_INSTALL OFF)
+  set(MSVC_USE_STATIC_CRT OFF)
   set(POSIX_REGEX_LIB "" CACHE INTERNAL "libarchive: No POSIX regular expression support")
   set(ENABLE_SAFESEH "" CACHE INTERNAL "libarchive: No /SAFESEH linker flag")
   set(WINDOWS_VERSION "WIN7" CACHE INTERNAL "libarchive: Set Windows version to use (Windows only)")

+ 2 - 0
Utilities/cmlibarchive/CMakeLists.txt

@@ -5,8 +5,10 @@ ENDIF()
 
 PROJECT(libarchive C)
 #
+if(0) # XXX(cmake): not needed for build within cmake
 # Include standard installation directories
 include(GNUInstallDirs)
+endif() # XXX(cmake): end
 #
 SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
 if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)