--- previous/src/CMakeLists.txt 2018/04/24 19:25:10 1.1 +++ previous/src/CMakeLists.txt 2018/04/24 19:31:16 1.1.1.5 @@ -1,13 +1,11 @@ set(SOURCES - cart.c cfgopts.c - configuration.c options.c change.c - control.c cycInt.c cycles.c dialog.c file.c - ioMem.c ioMemTabNEXT.c memorySnapShot.c keymap.c - m68000.c main.c - paths.c resolution.c reset.c - scandir.c nextMemory.c screen.c screenSnapShot.c shortcut.c - statusbar.c str.c zip.c unzip.c utils.c - video.c ) + adb.c audio.c bmap.c cfgopts.c configuration.c options.c change.c + control.c cycInt.c dialog.c dma.c esp.c enet_slirp.c ethernet.c + file.c floppy.c ioMem.c ioMemTabNEXT.c ioMemTabTurbo.c + keymap.c kms.c m68000.c main.c mo.c nbic.c nextMemory.c paths.c printer.c queue.c + ramdac.c reset.c rs.c rtcnvram.c scandir.c scc.c fast_screen.c host.c + scsi.c shortcut.c snd.c statusbar.c str.c sysReg.c tmc.c unzip.c + utils.c video.c zip.c) # When building for OSX, define specific sources for gui and ressources if(ENABLE_OSX_BUNDLE) @@ -21,13 +19,17 @@ endif(ENABLE_OSX_BUNDLE) # When building for Windows, define specific sources for gui and ressources +# and set the subsytem of the resulting .exe to "windows GUI" instead of "console" if(WIN32) set(GUIWIN_SOURCES gui-win/opencon.c) - set(GUIWIN_RES gui-win/hatari-winicon.rc) + set(GUIWIN_RES gui-win/previous-winicon.rc) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows") endif(WIN32) -include_directories(${CMAKE_BINARY_DIR} includes debug falcon uae-cpu - ${SDL_INCLUDE_DIR}) + set(CPUDIR cpu) + +include_directories(${CMAKE_BINARY_DIR} includes debug softfloat ${CPUDIR} + dsp dimension slirp ${SDL2_INCLUDE_DIR}) if(ZLIB_FOUND) include_directories(${ZLIB_INCLUDE_DIR}) @@ -42,16 +44,20 @@ if(X11_FOUND) endif(X11_FOUND) -link_directories(${CMAKE_CURRENT_BINARY_DIR}/debug ${CMAKE_CURRENT_BINARY_DIR}/gui-sdl ${CMAKE_CURRENT_BINARY_DIR}/uae-cpu) +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) add_subdirectory(debug) +add_subdirectory(softfloat) add_subdirectory(gui-sdl) -add_subdirectory(uae-cpu) +add_subdirectory(${CPUDIR}) +add_subdirectory(dsp) +add_subdirectory(dimension) +add_subdirectory(slirp) # When building for OSX, add specific sources if(ENABLE_OSX_BUNDLE) - add_executable(previous MACOSX_BUNDLE ${GUIOSX_RSRCS} ${SOURCES} ${GUIOSX_SOURCES}) - set_target_properties(previous PROPERTIES MACOSX_BUNDLE_INFO_PLIST + add_executable(Previous MACOSX_BUNDLE ${GUIOSX_RSRCS} ${SOURCES} ${GUIOSX_SOURCES}) + set_target_properties(Previous PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/Info-Previous.plist) set(MACOSX_BUNDLE_ICON_FILE Previous.icns) # Create Previous.app bundle @@ -63,7 +69,7 @@ if(ENABLE_OSX_BUNDLE) # Copy Localized .nib to Bundle COMMAND cp -R ${CMAKE_CURRENT_SOURCE_DIR}/gui-osx/*.lproj ${CMAKE_CURRENT_BINARY_DIR}/Previous.app/Contents/Resources/ ) - add_dependencies(previous osx_bundle_dirs) + add_dependencies(Previous osx_bundle_dirs) set_source_files_properties(${GUIOSX_RSRCS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) @@ -76,55 +82,55 @@ elseif(WIN32) ENABLE_LANGUAGE(RC) set(CMAKE_RC_COMPILE_OBJECT " -Ocoff -o ") set_source_files_properties(${GUIWIN_RES} PROPERTIES LANGUAGE RC) - add_executable(previous ${GUIWIN_RES} ${SOURCES} ${GUIWIN_SOURCES}) + add_executable(Previous ${GUIWIN_RES} ${SOURCES} ${GUIWIN_SOURCES}) # Other targets, use default sources else() - add_executable(previous ${SOURCES}) + add_executable(Previous ${SOURCES}) endif(ENABLE_OSX_BUNDLE) -target_link_libraries(previous Debug GuiSdl UaeCpu ${SDL_LIBRARY}) +target_link_libraries(Previous Debug GuiSdl UaeCpu DSP Dimension Slirp SoftFloat ${SDL2_LIBRARY}) if(MATH_FOUND AND NOT APPLE) - target_link_libraries(previous ${MATH_LIBRARY}) + target_link_libraries(Previous ${MATH_LIBRARY}) endif() -if(SDLMAIN_LIBRARY) - target_link_libraries(previous ${SDLMAIN_LIBRARY}) -endif(SDLMAIN_LIBRARY) +if(SDL2MAIN_LIBRARY) + target_link_libraries(Previous ${SDL2MAIN_LIBRARY}) +endif(SDL2MAIN_LIBRARY) if(READLINE_FOUND) - target_link_libraries(previous ${READLINE_LIBRARY}) + target_link_libraries(Previous ${READLINE_LIBRARY}) endif(READLINE_FOUND) if(ZLIB_FOUND) - target_link_libraries(previous ${ZLIB_LIBRARY}) + target_link_libraries(Previous ${ZLIB_LIBRARY}) endif(ZLIB_FOUND) if(PNG_FOUND) - target_link_libraries(previous ${PNG_LIBRARY}) + target_link_libraries(Previous ${PNG_LIBRARY}) endif(PNG_FOUND) if(X11_FOUND) - target_link_libraries(previous ${X11_X11_LIB}) + target_link_libraries(Previous ${X11_LIBRARIES}) endif(X11_FOUND) if(PORTAUDIO_FOUND) - target_link_libraries(previous ${PORTAUDIO_LIBRARY}) + target_link_libraries(Previous ${PORTAUDIO_LIBRARY}) endif(PORTAUDIO_FOUND) if(WIN32) # Needed for socket() on Windows - target_link_libraries(hatari ws2_32) + target_link_libraries(Previous ws2_32 Iphlpapi) endif(WIN32) if(ENABLE_OSX_BUNDLE) - install(TARGETS previous BUNDLE DESTINATION /Applications) + install(TARGETS Previous BUNDLE DESTINATION /Applications) else() - install(TARGETS previous RUNTIME DESTINATION ${BINDIR}) - install(FILES previous-icon.bmp DESTINATION ${DATADIR}) - file(GLOB TOS_IMG_FILE tos.img) - if(TOS_IMG_FILE) - install(FILES tos.img DESTINATION ${DATADIR}) - endif(TOS_IMG_FILE) + install(TARGETS Previous RUNTIME DESTINATION ${BINDIR}) + install(FILES Previous-icon.bmp DESTINATION ${DATADIR}) + install(FILES dimension_eeprom.bin DESTINATION ${BINDIR}) + install(FILES Rev_1.0_v41.BIN DESTINATION ${BINDIR}) + install(FILES Rev_2.5_v66.BIN DESTINATION ${BINDIR}) + install(FILES Rev_3.3_v74.BIN DESTINATION ${BINDIR}) endif(ENABLE_OSX_BUNDLE)