Skip to content

Commit

Permalink
Fix some compilation problems on macOS
Browse files Browse the repository at this point in the history
Experimental, to be tested on other platforms
  • Loading branch information
YetAnotherEmuDev authored and YetAnotherEmuDev committed Jan 20, 2020
1 parent f996d31 commit 1785008
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 2.8)
project(NanoboyAdvance C CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

set(PLATFORM "sdl" CACHE STRING "Build Target (sdl, ...)")

set(COMPILE_FLAGS "${COMPILE_FLAGS} -Ofast")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++1z")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}")

#add_definitions(-pg)
#set(CMAKE_EXE_LINKER_FLAGS -pg)
Expand Down
1 change: 0 additions & 1 deletion source/gba/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ set(HEADERS
)

add_library(gba STATIC ${SOURCES} ${HEADERS})
target_link_libraries(gba stdc++fs)
1 change: 1 addition & 0 deletions source/platform/sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SET(HEADERS

INCLUDE(FindSDL2 REQUIRED)
FIND_PACKAGE(SDL2 REQUIRED)
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIR})

ADD_EXECUTABLE(NanoboyAdvance-SDL ${SOURCES} ${HEADERS})
TARGET_LINK_LIBRARIES(NanoboyAdvance-SDL gba)
Expand Down
4 changes: 0 additions & 4 deletions source/platform/sdl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
* along with NanoboyAdvance. If not, see <http://www.gnu.org/licenses/>.
*/

#ifdef _MSC_VER
#include "SDL.h"
#else
#include <SDL2/SDL.h>
#endif

#undef main

Expand Down

0 comments on commit 1785008

Please sign in to comment.