|
|
1.1 root 1: set(SOURCES 1.1.1.4 ! root 2: adb.c audio.c bmap.c cfgopts.c clocks_timings.c configuration.c options.c change.c ! 3: control.c cycInt.c cycles.c dialog.c dma.c esp.c enet_slirp.c ethernet.c ! 4: file.c floppy.c ioMem.c ioMemTabNEXT.c ioMemTabTurbo.c memorySnapShot.c ! 5: keymap.c kms.c m68000.c main.c mo.c nbic.c nextMemory.c paths.c printer.c queue.c ! 6: ramdac.c resolution.c reset.c rs.c rtcnvram.c scandir.c scc.c fast_screen.c ! 7: screenSnapShot.c scsi.c shortcut.c snd.c statusbar.c str.c sysReg.c tmc.c unzip.c ! 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.4 ! root 31: include_directories(${CMAKE_BINARY_DIR} includes debug ${CPUDIR} dsp dimension slirp ! 32: ${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.4 ! root 47: link_directories(${CMAKE_CURRENT_BINARY_DIR}/debug ${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) 50: add_subdirectory(gui-sdl) 1.1.1.2 root 51: add_subdirectory(${CPUDIR}) 1.1.1.4 ! root 52: add_subdirectory(dsp) ! 53: add_subdirectory(dimension) ! 54: add_subdirectory(slirp) 1.1 root 55: 56: # When building for OSX, add specific sources 57: if(ENABLE_OSX_BUNDLE) 1.1.1.4 ! root 58: add_executable(Previous MACOSX_BUNDLE ${GUIOSX_RSRCS} ${SOURCES} ${GUIOSX_SOURCES}) ! 59: set_target_properties(Previous PROPERTIES MACOSX_BUNDLE_INFO_PLIST 1.1 root 60: ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/Info-Previous.plist) 61: set(MACOSX_BUNDLE_ICON_FILE Previous.icns) 62: # Create Previous.app bundle 63: add_custom_target(osx_bundle_dirs 64: COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources 65: COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/MacOS 66: COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/${MACOSX_BUNDLE_ICON_FILE} 67: ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} 68: # Copy Localized .nib to Bundle 69: COMMAND cp -R ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/*.lproj ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources/ 70: ) 1.1.1.4 ! root 71: add_dependencies(Previous osx_bundle_dirs) 1.1 root 72: set_source_files_properties(${GUIOSX_RSRCS} 73: PROPERTIES MACOSX_PACKAGE_LOCATION Resources) 74: 75: # When building for Windows, add specific sources + method to compile .rc files 76: elseif(WIN32) 77: # Set a default rc compiler if it was not defined yet 78: if(NOT CMAKE_RC_COMPILER) 79: set(CMAKE_RC_COMPILER windres) 80: endif(NOT CMAKE_RC_COMPILER) 81: ENABLE_LANGUAGE(RC) 82: set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -Ocoff -o <OBJECT> <SOURCE>") 83: set_source_files_properties(${GUIWIN_RES} PROPERTIES LANGUAGE RC) 1.1.1.4 ! root 84: add_executable(Previous ${GUIWIN_RES} ${SOURCES} ${GUIWIN_SOURCES}) 1.1 root 85: 86: # Other targets, use default sources 87: else() 1.1.1.4 ! root 88: add_executable(Previous ${SOURCES}) 1.1 root 89: endif(ENABLE_OSX_BUNDLE) 90: 1.1.1.4 ! root 91: target_link_libraries(Previous Debug GuiSdl UaeCpu DSP Dimension Slirp ${SDL2_LIBRARY}) 1.1 root 92: 93: if(MATH_FOUND AND NOT APPLE) 1.1.1.4 ! root 94: target_link_libraries(Previous ${MATH_LIBRARY}) 1.1 root 95: endif() 96: 1.1.1.4 ! root 97: if(SDL2MAIN_LIBRARY) ! 98: target_link_libraries(Previous ${SDL2MAIN_LIBRARY}) ! 99: endif(SDL2MAIN_LIBRARY) 1.1 root 100: 101: if(READLINE_FOUND) 1.1.1.4 ! root 102: target_link_libraries(Previous ${READLINE_LIBRARY}) 1.1 root 103: endif(READLINE_FOUND) 104: 105: if(ZLIB_FOUND) 1.1.1.4 ! root 106: target_link_libraries(Previous ${ZLIB_LIBRARY}) 1.1 root 107: endif(ZLIB_FOUND) 108: 109: if(PNG_FOUND) 1.1.1.4 ! root 110: target_link_libraries(Previous ${PNG_LIBRARY}) 1.1 root 111: endif(PNG_FOUND) 112: 113: if(X11_FOUND) 1.1.1.4 ! root 114: target_link_libraries(Previous ${X11_LIBRARIES}) 1.1 root 115: endif(X11_FOUND) 116: 117: if(PORTAUDIO_FOUND) 1.1.1.4 ! root 118: target_link_libraries(Previous ${PORTAUDIO_LIBRARY}) 1.1 root 119: endif(PORTAUDIO_FOUND) 120: 121: if(WIN32) 122: # Needed for socket() on Windows 1.1.1.4 ! root 123: target_link_libraries(Previous ws2_32) 1.1 root 124: endif(WIN32) 125: 126: if(ENABLE_OSX_BUNDLE) 1.1.1.4 ! root 127: install(TARGETS Previous BUNDLE DESTINATION /Applications) 1.1 root 128: else() 1.1.1.4 ! root 129: install(TARGETS Previous RUNTIME DESTINATION ${BINDIR}) ! 130: install(FILES Previous-icon.bmp DESTINATION ${DATADIR}) 1.1 root 131: file(GLOB TOS_IMG_FILE tos.img) 132: if(TOS_IMG_FILE) 133: install(FILES tos.img DESTINATION ${DATADIR}) 134: endif(TOS_IMG_FILE) 135: endif(ENABLE_OSX_BUNDLE)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.