2019-09-09 20:13:28 +00:00
|
|
|
include(CheckIncludeFile)
|
|
|
|
|
|
|
|
CHECK_INCLUDE_FILE(Navigation.h HAVE_NAVIGATION_H)
|
|
|
|
CHECK_INCLUDE_FILE(OpenTransport.h HAVE_OPENTRANSPORT_H)
|
|
|
|
CHECK_INCLUDE_FILE(MacTCP.h HAVE_MACTCP_H)
|
|
|
|
|
2019-08-17 21:49:17 +00:00
|
|
|
set(HAVE_OPENTRANSPORT NO)
|
2019-09-09 20:13:28 +00:00
|
|
|
if(HAVE_OPENTRANSPORT_H)
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
|
|
|
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransportLib.a)
|
|
|
|
if(OPENTRANSPORT_LIBRARY)
|
|
|
|
set(HAVE_OPENTRANSPORT YES)
|
|
|
|
endif()
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
|
|
|
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransport.a)
|
|
|
|
if(OPENTRANSPORT_LIBRARY)
|
|
|
|
set(HAVE_OPENTRANSPORT YES)
|
|
|
|
endif()
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
2019-08-17 21:49:17 +00:00
|
|
|
set(HAVE_OPENTRANSPORT YES)
|
|
|
|
endif()
|
|
|
|
endif()
|
2019-01-26 18:05:04 +00:00
|
|
|
|
2019-11-11 08:58:45 +00:00
|
|
|
set(HAVE_NAVIGATION NO)
|
|
|
|
if(HAVE_NAVIGATION_H)
|
2019-11-15 00:22:07 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
|
|
|
find_library(NAVIGATION_LIBRARY NAMES libNavigation.a)
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
2019-11-11 08:58:45 +00:00
|
|
|
find_library(NAVIGATION_LIBRARY NAMES Navigation.far)
|
|
|
|
else()
|
|
|
|
set(HAVE_NAVIGATION YES)
|
2019-11-15 00:22:07 +00:00
|
|
|
set(NAVIGATION_LIBRARY)
|
|
|
|
endif()
|
|
|
|
if(NAVIGATION_LIBRARY)
|
|
|
|
set(HAVE_NAVIGATION YES)
|
2019-11-11 08:58:45 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(HAVE_MACTCP_H AND NOT CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
|
|
|
set(HAVE_MACTCP YES)
|
|
|
|
else()
|
|
|
|
set(HAVE_MACTCP NO)
|
|
|
|
endif()
|
|
|
|
|
2019-08-17 21:49:17 +00:00
|
|
|
set(CONNECTION_SOURCES
|
2019-01-26 18:05:04 +00:00
|
|
|
SharedFileStream.h
|
|
|
|
SharedFileStream.cc
|
|
|
|
SharedFileProvider.h
|
|
|
|
SharedFileProvider.cc
|
|
|
|
)
|
2018-05-14 21:58:11 +00:00
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
|
|
|
else()
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
SerialConnectionProvider.h
|
|
|
|
SerialConnectionProvider.cc
|
|
|
|
MacSerialStream.h
|
|
|
|
MacSerialStream.cc
|
|
|
|
)
|
2019-01-26 18:05:04 +00:00
|
|
|
endif()
|
2019-01-23 18:41:12 +00:00
|
|
|
|
2019-01-08 23:31:32 +00:00
|
|
|
|
2019-11-11 08:58:45 +00:00
|
|
|
if(HAVE_MACTCP)
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
MacTCPStream.h
|
|
|
|
MacTCPStream.cc
|
|
|
|
TCPConnectionProvider.h
|
|
|
|
TCPConnectionProvider.cc
|
|
|
|
)
|
2019-01-08 23:31:32 +00:00
|
|
|
endif()
|
2018-05-14 21:58:11 +00:00
|
|
|
|
2019-08-17 21:49:17 +00:00
|
|
|
if(HAVE_OPENTRANSPORT)
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
OpenTptStream.h
|
|
|
|
OpenTptStream.cc
|
|
|
|
OpenTptConnectionProvider.h
|
|
|
|
OpenTptConnectionProvider.cc
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-11-11 08:58:45 +00:00
|
|
|
|
|
|
|
option(LAUNCHAPPLSERVER_DEBUG_CONSOLE "Add a debug console to LaunchAPPLServer" FALSE)
|
|
|
|
|
|
|
|
set(MAYBE_CONSOLE)
|
|
|
|
if(LAUNCHAPPLSERVER_DEBUG_CONSOLE)
|
|
|
|
set(MAYBE_CONSOLE "CONSOLE")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2018-04-23 19:32:43 +00:00
|
|
|
add_application(LaunchAPPLServer
|
2018-05-06 00:02:29 +00:00
|
|
|
TYPE "APPL"
|
|
|
|
CREATOR "R68L"
|
2019-01-08 23:31:32 +00:00
|
|
|
${MAYBE_CONSOLE}
|
2018-05-06 00:02:29 +00:00
|
|
|
|
2018-04-23 19:32:43 +00:00
|
|
|
LaunchAPPLServer.r
|
2018-05-06 00:02:29 +00:00
|
|
|
LauncherIcon.r
|
2018-04-23 19:32:43 +00:00
|
|
|
LaunchAPPLServer.cc
|
2018-04-27 00:06:54 +00:00
|
|
|
AppLauncher.h
|
2018-05-05 22:56:48 +00:00
|
|
|
AppLauncher.cc
|
2018-05-06 16:49:43 +00:00
|
|
|
ToolLauncher.cc
|
2018-05-19 12:55:27 +00:00
|
|
|
Window.h
|
2018-05-06 16:49:43 +00:00
|
|
|
StatusDisplay.h
|
|
|
|
StatusDisplay.cc
|
2018-05-19 12:55:27 +00:00
|
|
|
AboutBox.h
|
|
|
|
AboutBox.cc
|
2018-05-08 07:43:02 +00:00
|
|
|
ConnectionProvider.h
|
2018-05-14 21:58:11 +00:00
|
|
|
CarbonFileCompat.h
|
2019-01-23 18:41:12 +00:00
|
|
|
Preferences.h
|
|
|
|
Preferences.cc
|
2018-05-09 21:16:45 +00:00
|
|
|
|
2018-05-14 21:58:11 +00:00
|
|
|
${CONNECTION_SOURCES}
|
2018-05-06 16:49:43 +00:00
|
|
|
)
|
2019-01-08 23:31:32 +00:00
|
|
|
if(LAUNCHAPPLSERVER_DEBUG_CONSOLE)
|
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE DEBUG_CONSOLE)
|
|
|
|
endif()
|
2019-08-17 21:49:17 +00:00
|
|
|
if(HAVE_OPENTRANSPORT)
|
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_OPENTRANSPORT)
|
|
|
|
endif()
|
2019-11-11 08:58:45 +00:00
|
|
|
if(HAVE_NAVIGATION)
|
2019-09-09 20:13:28 +00:00
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_NAVIGATION)
|
|
|
|
endif()
|
2019-11-11 08:58:45 +00:00
|
|
|
if(HAVE_MACTCP)
|
2019-09-09 20:13:28 +00:00
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_MACTCP)
|
|
|
|
endif()
|
2018-04-22 23:11:56 +00:00
|
|
|
|
2018-04-20 22:03:29 +00:00
|
|
|
target_link_libraries(LaunchAPPLServer LaunchAPPLCommon)
|
2018-04-26 23:36:33 +00:00
|
|
|
set_target_properties(LaunchAPPLServer PROPERTIES
|
|
|
|
CXX_STANDARD 17
|
|
|
|
)
|
2019-01-04 02:35:32 +00:00
|
|
|
target_compile_options(LaunchAPPLServer PRIVATE -ffunction-sections -Os)
|
2018-05-01 19:17:39 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
|
|
|
set_target_properties(LaunchAPPLServer PROPERTIES
|
|
|
|
LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-segments -Wl,${CMAKE_CURRENT_SOURCE_DIR}/LaunchAPPLServer.segmap"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set_target_properties(LaunchAPPLServer PROPERTIES
|
|
|
|
LINK_FLAGS "-Wl,-gc-sections"
|
|
|
|
)
|
|
|
|
endif()
|
2018-05-16 00:04:18 +00:00
|
|
|
|
2019-08-17 21:49:17 +00:00
|
|
|
if(HAVE_OPENTRANSPORT)
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
|
|
|
target_link_libraries(LaunchAPPLServer -lOpenTransportAppPPC -lOpenTransportLib -lOpenTptInternetLib)
|
|
|
|
endif()
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
|
|
|
target_link_libraries(LaunchAPPLServer -lOpenTransport -lOpenTransportApp -lOpenTptInet)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-11-15 00:22:07 +00:00
|
|
|
if(NAVIGATION_LIBRARY)
|
|
|
|
target_link_libraries(LaunchAPPLServer ${NAVIGATION_LIBRARY})
|
2019-01-24 16:39:10 +00:00
|
|
|
endif()
|