diff --git a/CMakeLists.txt b/CMakeLists.txt index 27d9f09bd..64b8ac75c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,10 +261,6 @@ if(DEFINED 3DS OR DEFINED PSP2 OR DEFINED WII OR DEFINED SWITCH) set(USE_LIBZIP OFF CACHE BOOL "") endif() -if(DEFINED 3DS) - add_definitions(-DFIXED_ROM_BUFFER) -endif() - if(DEFINED SWITCH) set(BUILD_GLES3 ON CACHE BOOL "Build with OpenGL|ES 3" FORCE) endif() @@ -282,10 +278,6 @@ if(WII) add_definitions(-U__STRICT_ANSI__) endif() -if(3DS OR WII) - add_definitions(-D_GNU_SOURCE) -endif() - include(CheckCCompilerFlag) include(CheckFunctionExists) include(CheckIncludeFiles) diff --git a/src/platform/3ds/CMakeLists.txt b/src/platform/3ds/CMakeLists.txt index b077ca53a..29da450fa 100644 --- a/src/platform/3ds/CMakeLists.txt +++ b/src/platform/3ds/CMakeLists.txt @@ -10,7 +10,7 @@ find_program(RAW2C raw2c) set(STRIP "${cross_prefix_path}strip" CACHE INTERNAL "symbol stripper") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format" PARENT_SCOPE) -set(OS_DEFINES COLOR_16_BIT COLOR_5_6_5 IOAPI_NO_64) +set(OS_DEFINES _GNU_SOURCE COLOR_16_BIT COLOR_5_6_5 FIXED_ROM_BUFFER IOAPI_NO_64) include_directories(${CMAKE_CURRENT_BINARY_DIR}) if(${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo) diff --git a/src/platform/wii/CMakeLists.txt b/src/platform/wii/CMakeLists.txt index d0a1a7821..318c176a6 100644 --- a/src/platform/wii/CMakeLists.txt +++ b/src/platform/wii/CMakeLists.txt @@ -3,7 +3,7 @@ find_program(GXTEXCONV gxtexconv) find_program(RAW2C raw2c) find_program(WIILOAD wiiload) -set(OS_DEFINES COLOR_16_BIT COLOR_5_6_5 USE_VFS_FILE IOAPI_NO_64 FIXED_ROM_BUFFER) +set(OS_DEFINES _GNU_SOURCE COLOR_16_BIT COLOR_5_6_5 USE_VFS_FILE IOAPI_NO_64 FIXED_ROM_BUFFER) list(APPEND CORE_VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-file.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-dirent.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-devlist.c) include_directories(${CMAKE_CURRENT_BINARY_DIR})