diff --git a/CMakeLists.txt b/CMakeLists.txt index fedc54f..e6411cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ endif() set(CMAKE_CXX_STANDARD 17) #needed by libocore and libutils. - #set globally to match MAME's genie scripts. -if(CMAKE_SYSTEM_NAME STREQUAL "Windows") +if(WIN32) add_compile_definitions( X64_WINDOWS_ABI CRLF=3 diff --git a/cmake_subdirs/expat/CMakeLists.txt b/cmake_subdirs/expat/CMakeLists.txt index 5eb6c27..e72f2d6 100644 --- a/cmake_subdirs/expat/CMakeLists.txt +++ b/cmake_subdirs/expat/CMakeLists.txt @@ -38,7 +38,7 @@ add_compile_definitions( ) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") +if(UNIX) add_compile_definitions( HAVE_DLFCN_H HAVE_FCNTL_H diff --git a/cmake_subdirs/ocore_sdl/CMakeLists.txt b/cmake_subdirs/ocore_sdl/CMakeLists.txt index 47707bf..e2a4052 100644 --- a/cmake_subdirs/ocore_sdl/CMakeLists.txt +++ b/cmake_subdirs/ocore_sdl/CMakeLists.txt @@ -21,7 +21,7 @@ ${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osd_getenv.cpp #instead of osdlib_${targ ${CMAKE_SOURCE_DIR}/src/osd/modules/lib/osdlib.h ) -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") +if(UNIX) target_sources(ocore_sdl PRIVATE ${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixdir.cpp ${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixfile.cpp @@ -29,7 +29,7 @@ target_sources(ocore_sdl PRIVATE ${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixptty.cpp ${CMAKE_SOURCE_DIR}/src/osd/modules/file/posixsocket.cpp ) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") +elseif(WIN32) target_sources(ocore_sdl PRIVATE ${CMAKE_SOURCE_DIR}/src/osd/modules/file/windir.cpp ${CMAKE_SOURCE_DIR}/src/osd/modules/file/winfile.cpp