Annotation of previous/src/CMakeLists.txt, revision 1.1.1.3

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.