Correct check for WIN32 in cmake files for programs
Condition was checking for Visual Studio, not use of WIN32
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
diff --git a/programs/pkey/CMakeLists.txt b/programs/pkey/CMakeLists.txt
index 81f4311..b95a330 100644
--- a/programs/pkey/CMakeLists.txt
+++ b/programs/pkey/CMakeLists.txt
@@ -1,6 +1,10 @@
-if(MSVC)
+set(libs
+ mbedtls
+)
+
+if(WIN32)
set(libs ${libs} bcrypt)
-endif()
+endif(WIN32)
set(executables_mbedtls
dh_client
diff --git a/programs/random/CMakeLists.txt b/programs/random/CMakeLists.txt
index e78ce06..20fe7e1 100644
--- a/programs/random/CMakeLists.txt
+++ b/programs/random/CMakeLists.txt
@@ -1,6 +1,10 @@
-if(MSVC)
+set(libs
+ mbedtls
+)
+
+if(WIN32)
set(libs ${libs} bcrypt)
-endif()
+endif(WIN32)
set(executables
gen_entropy
diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt
index 9871952..cfa9a0f 100644
--- a/programs/ssl/CMakeLists.txt
+++ b/programs/ssl/CMakeLists.txt
@@ -5,9 +5,9 @@
${mbedtls_target}
)
-if(MSVC)
+if(WIN32)
set(libs ${libs} bcrypt)
-endif()
+endif(WIN32)
set(executables
dtls_client
diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt
index 1853d7f..24829c7 100644
--- a/programs/test/CMakeLists.txt
+++ b/programs/test/CMakeLists.txt
@@ -2,9 +2,9 @@
${mbedtls_target}
)
-if(MSVC)
+if(WIN32)
set(libs ${libs} bcrypt)
-endif()
+endif(WIN32)
set(executables_libs
query_included_headers
diff --git a/programs/x509/CMakeLists.txt b/programs/x509/CMakeLists.txt
index 30d272d..f1a4a5a 100644
--- a/programs/x509/CMakeLists.txt
+++ b/programs/x509/CMakeLists.txt
@@ -1,9 +1,10 @@
set(libs
${mbedx509_target}
)
-if(MSVC)
+
+if(WIN32)
set(libs ${libs} bcrypt)
-endif()
+endif(WIN32)
set(executables
cert_app