diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2017-12-28 22:59:44 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2017-12-28 22:59:44 +0000 |
| commit | cf198735de6b80695ed844c24946fe2b9f21292f (patch) | |
| tree | fbd8091b3bbe45e545acb275a04642211ac456cc /CMake/setup.cmake | |
| parent | d13bb6b40faff7eed8999a754723ebecd17f71d5 (diff) | |
CMake: Fix missing WIN32 definition on Windows platforms.
Although some Windows compilers still #define WIN32, more and more
standard compliant compilers only #define _WIN32. FLTK *did* #define
WIN32 for all Windows targets with autoconf/configure, but that bit
was lost for CMake builds. This is necessary until we replace WIN32
with _WIN32 throughout the Windows specific code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'CMake/setup.cmake')
| -rw-r--r-- | CMake/setup.cmake | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/CMake/setup.cmake b/CMake/setup.cmake index b77edd570..4e3d82ab6 100644 --- a/CMake/setup.cmake +++ b/CMake/setup.cmake @@ -69,14 +69,19 @@ set(FLTK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc CACHE PATH # platform dependent information ####################################################################### +# I think this code is useless, so I disabled it by commenting it out. +# Let's wait and see if it does any harm (user complaints). +# The real fix is below: add_definitions(-DWIN32). +# AlbrechtS, Dec 28, 2017. # fix no WIN32 defined issue -if(NOT WIN32) - if(_WIN32) - set(WIN32 _WIN32) - elseif(__WIN32__) - set(WIN32 __WIN32__) - endif(_WIN32) -endif(NOT WIN32) +# if(NOT WIN32) +# if(_WIN32) +# set(WIN32 _WIN32) +# elseif(__WIN32__) +# set(WIN32 __WIN32__) +# endif(_WIN32) +# endif(NOT WIN32) +# End of code commented out on Dec 28, 2017 # set where config files go if(WIN32 AND NOT CYGWIN) @@ -111,6 +116,7 @@ if(APPLE) endif(APPLE) if(WIN32) + add_definitions(-DWIN32) if(MSVC) add_definitions(-DWIN32_LEAN_AND_MEAN) add_definitions(-D_CRT_SECURE_NO_WARNINGS) |
