From 1acde6b003812e9964bdf67db5c1ce68a566e675 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 Jul 2014 14:12:39 -0400 Subject: MSVC: Use STREQUAL to check for WindowsCE In the Platform/Windows-MSVC module it is not necessary to use MATCHES because we are comparing against an exact string. --- Modules/Platform/Windows-MSVC.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 8e988c9..5b57ee7 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -38,7 +38,7 @@ endif() set(WIN32 1) -if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE") +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") set(CMAKE_CREATE_WIN32_EXE "/entry:WinMainCRTStartup") set(CMAKE_CREATE_CONSOLE_EXE "/entry:mainACRTStartup") set(_PLATFORM_LINK_FLAGS " /subsystem:windowsce") -- cgit v0.12 From 05373f7ea79f950bf56657e6b5aabb02b34d4c76 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 Jul 2014 14:14:58 -0400 Subject: WindowsCE: Refactor setting of "WINCE" Move it to the Platform/Windows module since it is independent of the compiler used. While at it, remove redundant "WIN32" setting from Platform/Windows-MSVC since Plaform/Windows already sets its. --- Modules/Platform/Windows-MSVC.cmake | 3 --- Modules/Platform/Windows.cmake | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 5b57ee7..2cfe6fe 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -36,13 +36,10 @@ else() set(CMAKE_CL_NOLOGO "/nologo") endif() -set(WIN32 1) - if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") set(CMAKE_CREATE_WIN32_EXE "/entry:WinMainCRTStartup") set(CMAKE_CREATE_CONSOLE_EXE "/entry:mainACRTStartup") set(_PLATFORM_LINK_FLAGS " /subsystem:windowsce") - set(WINCE 1) else() set(CMAKE_CREATE_WIN32_EXE "/subsystem:windows") set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:console") diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake index b158a9d..7e97111 100644 --- a/Modules/Platform/Windows.cmake +++ b/Modules/Platform/Windows.cmake @@ -1,5 +1,9 @@ set(WIN32 1) +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") + set(WINCE 1) +endif() + set(CMAKE_STATIC_LIBRARY_PREFIX "") set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") set(CMAKE_SHARED_LIBRARY_PREFIX "") # lib -- cgit v0.12 From 7079f33d6ac00f9417d2d7aa222c8d0675ce3752 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 Jul 2014 14:06:52 -0400 Subject: WindowsCE: Drop unused Platform/WindowsCE-MSVC module This module was created to mirror Platform/Windows-MSVC.cmake, but this is not necessary because nothing includes "Platform/-.cmake" directly. The Platform/Windows-MSVC module is only a helper for the Platform/Windows-MSVC- modules. --- Modules/Platform/WindowsCE-MSVC.cmake | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Modules/Platform/WindowsCE-MSVC.cmake diff --git a/Modules/Platform/WindowsCE-MSVC.cmake b/Modules/Platform/WindowsCE-MSVC.cmake deleted file mode 100644 index d28b4ab..0000000 --- a/Modules/Platform/WindowsCE-MSVC.cmake +++ /dev/null @@ -1 +0,0 @@ -include(Platform/Windows-MSVC) -- cgit v0.12