|
|
1.1 root 1: set(SOURCES 1.1.1.5 ! root 2: adb.c audio.c bmap.c cfgopts.c configuration.c options.c change.c ! 3: control.c cycInt.c dialog.c dma.c esp.c enet_slirp.c ethernet.c ! 4: file.c floppy.c ioMem.c ioMemTabNEXT.c ioMemTabTurbo.c 1.1.1.4 root 5: keymap.c kms.c m68000.c main.c mo.c nbic.c nextMemory.c paths.c printer.c queue.c 1.1.1.5 ! root 6: ramdac.c reset.c rs.c rtcnvram.c scandir.c scc.c fast_screen.c host.c ! 7: scsi.c shortcut.c snd.c statusbar.c str.c sysReg.c tmc.c unzip.c 1.1.1.4 root 8: utils.c video.c zip.c) 1.1 root 9: 10: # When building for OSX, define specific sources for gui and ressources 11: if(ENABLE_OSX_BUNDLE) 12: set(GUIOSX_SOURCES 13: gui-osx/AlertHooks.m gui-osx/PrefsController.m gui-osx/Shared.m 14: gui-osx/CreateFloppyController.m gui-osx/SDLMain.m) 15: set_source_files_properties(${GUIOSX_SOURCES} PROPERTIES LANGUAGE C) 16: set(GUIOSX_RSRCS 17: gui-osx/Previous.icns gui-osx/English.lproj gui-osx/French.lproj) 18: endif(ENABLE_OSX_BUNDLE) 19: 20: 21: # When building for Windows, define specific sources for gui and ressources 1.1.1.2 root 22: # and set the subsytem of the resulting .exe to "windows GUI" instead of "console" 1.1 root 23: if(WIN32) 24: set(GUIWIN_SOURCES gui-win/opencon.c) 1.1.1.4 root 25: set(GUIWIN_RES gui-win/previous-winicon.rc) 1.1.1.2 root 26: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows") 1.1 root 27: endif(WIN32) 28: 1.1.1.2 root 29: set(CPUDIR cpu) 30: 1.1.1.5 ! root 31: include_directories(${CMAKE_BINARY_DIR} includes debug softfloat ${CPUDIR} ! 32: dsp dimension slirp ${SDL2_INCLUDE_DIR}) 1.1 root 33: 34: if(ZLIB_FOUND) 35: include_directories(${ZLIB_INCLUDE_DIR}) 36: endif(ZLIB_FOUND) 37: 38: if(PNG_FOUND) 39: include_directories(${PNG_INCLUDE_DIR}) 40: endif(PNG_FOUND) 41: 42: if(X11_FOUND) 43: include_directories(${X11_INCLUDE_DIR}) 44: endif(X11_FOUND) 45: 46: 1.1.1.5 ! root 47: link_directories(${CMAKE_CURRENT_BINARY_DIR}/debug ${CMAKE_CURRENT_BINARY_DIR}/softfloat ${CMAKE_CURRENT_BINARY_DIR}/gui-sdl ${CMAKE_CURRENT_BINARY_DIR}/${CPUDIR} ${CMAKE_CURRENT_BINARY_DIR}/dsp ${CMAKE_CURRENT_BINARY_DIR}/dimension ${CMAKE_CURRENT_BINARY_DIR}/slirp) 1.1 root 48: 49: add_subdirectory(debug) 1.1.1.5 ! root 50: add_subdirectory(softfloat) 1.1 root 51: add_subdirectory(gui-sdl) 1.1.1.2 root 52: add_subdirectory(${CPUDIR}) 1.1.1.4 root 53: add_subdirectory(dsp) 54: add_subdirectory(dimension) 55: add_subdirectory(slirp) 1.1 root 56: 57: # When building for OSX, add specific sources 58: if(ENABLE_OSX_BUNDLE) 1.1.1.4 root 59: add_executable(Previous MACOSX_BUNDLE ${GUIOSX_RSRCS} ${SOURCES} ${GUIOSX_SOURCES}) 60: set_target_properties(Previous PROPERTIES MACOSX_BUNDLE_INFO_PLIST 1.1 root 61: ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/Info-Previous.plist) 62: set(MACOSX_BUNDLE_ICON_FILE Previous.icns) 63: # Create Previous.app bundle 64: add_custom_target(osx_bundle_dirs 65: COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources 66: COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/MacOS 67: COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/${MACOSX_BUNDLE_ICON_FILE} 68: ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} 69: # Copy Localized .nib to Bundle 70: COMMAND cp -R ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/*.lproj ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources/ 71: ) 1.1.1.4 root 72: add_dependencies(Previous osx_bundle_dirs) 1.1 root 73: set_source_files_properties(${GUIOSX_RSRCS} 74: PROPERTIES MACOSX_PACKAGE_LOCATION Resources) 75: 76: # When building for Windows, add specific sources + method to compile .rc files 77: elseif(WIN32) 78: # Set a default rc compiler if it was not defined yet 79: if(NOT CMAKE_RC_COMPILER) 80: set(CMAKE_RC_COMPILER windres) 81: endif(NOT CMAKE_RC_COMPILER) 82: ENABLE_LANGUAGE(RC) 83: set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -Ocoff -o <OBJECT> <SOURCE>") 84: set_source_files_properties(${GUIWIN_RES} PROPERTIES LANGUAGE RC) 1.1.1.4 root 85: add_executable(Previous ${GUIWIN_RES} ${SOURCES} ${GUIWIN_SOURCES}) 1.1 root 86: 87: # Other targets, use default sources 88: else() 1.1.1.4 root 89: add_executable(Previous ${SOURCES}) 1.1 root 90: endif(ENABLE_OSX_BUNDLE) 91: 1.1.1.5 ! root 92: target_link_libraries(Previous Debug GuiSdl UaeCpu DSP Dimension Slirp SoftFloat ${SDL2_LIBRARY}) 1.1 root 93: 94: if(MATH_FOUND AND NOT APPLE) 1.1.1.4 root 95: target_link_libraries(Previous ${MATH_LIBRARY}) 1.1 root 96: endif() 97: 1.1.1.4 root 98: if(SDL2MAIN_LIBRARY) 99: target_link_libraries(Previous ${SDL2MAIN_LIBRARY}) 100: endif(SDL2MAIN_LIBRARY) 1.1 root 101: 102: if(READLINE_FOUND) 1.1.1.4 root 103: target_link_libraries(Previous ${READLINE_LIBRARY}) 1.1 root 104: endif(READLINE_FOUND) 105: 106: if(ZLIB_FOUND) 1.1.1.4 root 107: target_link_libraries(Previous ${ZLIB_LIBRARY}) 1.1 root 108: endif(ZLIB_FOUND) 109: 110: if(PNG_FOUND) 1.1.1.4 root 111: target_link_libraries(Previous ${PNG_LIBRARY}) 1.1 root 112: endif(PNG_FOUND) 113: 114: if(X11_FOUND) 1.1.1.4 root 115: target_link_libraries(Previous ${X11_LIBRARIES}) 1.1 root 116: endif(X11_FOUND) 117: 118: if(PORTAUDIO_FOUND) 1.1.1.4 root 119: target_link_libraries(Previous ${PORTAUDIO_LIBRARY}) 1.1 root 120: endif(PORTAUDIO_FOUND) 121: 122: if(WIN32) 123: # Needed for socket() on Windows 1.1.1.5 ! root 124: target_link_libraries(Previous ws2_32 Iphlpapi) 1.1 root 125: endif(WIN32) 126: 127: if(ENABLE_OSX_BUNDLE) 1.1.1.4 root 128: install(TARGETS Previous BUNDLE DESTINATION /Applications) 1.1 root 129: else() 1.1.1.4 root 130: install(TARGETS Previous RUNTIME DESTINATION ${BINDIR}) 131: install(FILES Previous-icon.bmp DESTINATION ${DATADIR}) 1.1.1.5 ! root 132: install(FILES dimension_eeprom.bin DESTINATION ${BINDIR}) ! 133: install(FILES Rev_1.0_v41.BIN DESTINATION ${BINDIR}) ! 134: install(FILES Rev_2.5_v66.BIN DESTINATION ${BINDIR}) ! 135: install(FILES Rev_3.3_v74.BIN DESTINATION ${BINDIR}) 1.1 root 136: endif(ENABLE_OSX_BUNDLE)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.