mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[several ports] Remove CMake double expansions inside if() directives
This commit is contained in:
parent
7cd465b889
commit
d2c728e0bc
@ -24,7 +24,7 @@ vcpkg_apply_patches(
|
||||
${CMAKE_CURRENT_LIST_DIR}/Fix-building-in-Visual-Studio-2017.patch
|
||||
)
|
||||
|
||||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(DEBUG_CONFIG "Debug Static")
|
||||
set(RELEASE_CONFIG "Release Static")
|
||||
else()
|
||||
@ -53,7 +53,7 @@ file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG
|
||||
file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
@ -23,7 +23,7 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/)
|
||||
set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe)
|
||||
|
||||
if (NOT EXISTS ${FETCHED_GBC_PATH})
|
||||
if (NOT EXISTS "${FETCHED_GBC_PATH}")
|
||||
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.")
|
||||
endif()
|
||||
|
||||
|
@ -72,7 +72,7 @@ set(SRCS ${DEPRECATION_SRCS}
|
||||
# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro.
|
||||
# For this purpouse we include (depending on the BUILD_SHARED_LIBS )
|
||||
# the appropriate FreeImageConfig.h .
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
@ -81,7 +81,7 @@ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
|
||||
add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS})
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS)
|
||||
else()
|
||||
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB)
|
||||
@ -119,7 +119,7 @@ add_library(FreeImagePlus
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc)
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS)
|
||||
else()
|
||||
target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB)
|
||||
|
@ -119,7 +119,7 @@ RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
install(FILES agent/address.h DESTINATION include/nice)
|
||||
install(FILES agent/agent.h DESTINATION include/nice)
|
||||
install(FILES agent/candidate.h DESTINATION include/nice)
|
||||
|
@ -66,7 +66,7 @@ if(USE_X86)
|
||||
add_definitions(-DOC_X86_ASM)
|
||||
endif()
|
||||
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DLIBTHEORA_EXPORTS)
|
||||
endif()
|
||||
|
||||
|
@ -22,7 +22,7 @@ vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS)
|
||||
set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe")
|
||||
set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084")
|
||||
|
||||
if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
|
||||
if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}")
|
||||
set(MPIEXEC_VERSION_LOGNAME "mpiexec-version")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SYSTEM_MPIEXEC_FILEPATH}
|
||||
@ -31,8 +31,8 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
|
||||
)
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT)
|
||||
|
||||
if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
|
||||
if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION})
|
||||
if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
|
||||
if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION)
|
||||
download_msmpi_redistributable_package()
|
||||
|
||||
message(FATAL_ERROR
|
||||
@ -102,7 +102,7 @@ file(INSTALL
|
||||
DESTINATION
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
|
||||
if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
|
||||
file(INSTALL
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
|
||||
@ -121,7 +121,7 @@ file(INSTALL
|
||||
DESTINATION
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
|
||||
if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
|
||||
file(INSTALL
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
|
||||
|
@ -1,5 +1,5 @@
|
||||
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
|
||||
if(NOT ${SUFFIX_D})
|
||||
if(NOT SUFFIX_D)
|
||||
find_library(GLSLANG glslang)
|
||||
find_library(OSDEPENDENT OSDependent)
|
||||
find_library(OGLCOMPILER OGLCompiler)
|
||||
|
@ -1,5 +1,5 @@
|
||||
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
|
||||
if(NOT ${SUFFIX_D})
|
||||
if(NOT SUFFIX_D)
|
||||
find_library(SPIRVTOOLSOPT spirv-tools-opt)
|
||||
find_library(SPIRVTOOLS spirv-tools)
|
||||
ELSE()
|
||||
|
@ -55,7 +55,7 @@ set(SRCS zzip/dir.c
|
||||
|
||||
add_library(zziplib ${SRCS} ${HEADERS})
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS)
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user