diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index 78266b6eb0..868efcdbed 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -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 diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index f3664da8ca..147ebeea83 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -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() diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index f385f508c3..9f4f1677be 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -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) diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt index c631d33171..7454a00460 100644 --- a/ports/libnice/CMakeLists.txt +++ b/ports/libnice/CMakeLists.txt @@ -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) diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index 24ecbccf48..cf8799e5d8 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -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() diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index ca841313eb..893e6f124d 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -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" diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt index f4e0830c68..580ffa1d13 100644 --- a/ports/shaderc/CMakeLists.txt +++ b/ports/shaderc/CMakeLists.txt @@ -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) diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt index 6aa738b1fd..618177fa65 100644 --- a/ports/shaderc/CMakeLists_spirv.txt +++ b/ports/shaderc/CMakeLists_spirv.txt @@ -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() diff --git a/ports/zziplib/CMakeLists.txt b/ports/zziplib/CMakeLists.txt index 7f46079e9b..c99bc0ddd9 100644 --- a/ports/zziplib/CMakeLists.txt +++ b/ports/zziplib/CMakeLists.txt @@ -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()