Merge pull request #1847 from jvernet/master

MacOsX Compilation fixed
This commit is contained in:
Miran Grča
2021-11-19 17:14:07 +01:00
committed by GitHub
3 changed files with 24 additions and 11 deletions

View File

@@ -419,6 +419,9 @@ pc_init(int argc, char *argv[])
plat_getcwd(usr_path, sizeof(usr_path) - 1);
plat_getcwd(rom_path, sizeof(rom_path) - 1);
printf("JV:usr_path %s\n",usr_path);
printf("JV:rom_path %s\n",usr_path);
memset(path, 0x00, sizeof(path));
memset(path2, 0x00, sizeof(path));
@@ -587,6 +590,7 @@ usage:
plat_dir_create(usr_path);
}
#ifdef __APPLE__
getDefaultROMPath(mac_rom_path);
strcpy(path2, mac_rom_path);

View File

@@ -95,9 +95,12 @@ endif()
#some macOS specific configuration steps
if(APPLE)
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries (86Box ${COCOA_LIBRARY} )
# Force using the newest library if it's installed by homebrew
set(CMAKE_FIND_FRAMEWORK LAST)
# prepare stuff for macOS app bundles
set(CMAKE_MACOSX_BUNDLE 1)
@@ -224,7 +227,10 @@ add_subdirectory(sio)
add_subdirectory(scsi)
add_subdirectory(sound)
add_subdirectory(video)
if (WIN32)
if(APPLE)
add_subdirectory(mac)
add_subdirectory(unix)
elseif(WIN32)
add_subdirectory(win)
else()
add_subdirectory(unix)

3
src/mac/CMakeLists.txt Normal file
View File

@@ -0,0 +1,3 @@
include_directories("./mac")
target_sources(86Box PUBLIC "./macOSXGlue.m")