2019-09-09 22:13:28 +02: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 23:49:17 +02:00
|
|
|
set(HAVE_OPENTRANSPORT NO)
|
2019-09-09 22:13:28 +02: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 23:49:17 +02:00
|
|
|
set(HAVE_OPENTRANSPORT YES)
|
|
|
|
endif()
|
|
|
|
endif()
|
2019-01-26 19:05:04 +01:00
|
|
|
|
2019-11-11 09:58:45 +01:00
|
|
|
set(HAVE_NAVIGATION NO)
|
|
|
|
if(HAVE_NAVIGATION_H)
|
2019-11-15 01:22:07 +01:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
|
|
|
find_library(NAVIGATION_LIBRARY NAMES libNavigation.a)
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
2019-11-11 09:58:45 +01:00
|
|
|
find_library(NAVIGATION_LIBRARY NAMES Navigation.far)
|
|
|
|
else()
|
|
|
|
set(HAVE_NAVIGATION YES)
|
2019-11-15 01:22:07 +01:00
|
|
|
set(NAVIGATION_LIBRARY)
|
|
|
|
endif()
|
|
|
|
if(NAVIGATION_LIBRARY)
|
|
|
|
set(HAVE_NAVIGATION YES)
|
2019-11-11 09:58:45 +01: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 23:49:17 +02:00
|
|
|
set(CONNECTION_SOURCES
|
2019-01-26 19:05:04 +01:00
|
|
|
SharedFileStream.h
|
|
|
|
SharedFileStream.cc
|
|
|
|
SharedFileProvider.h
|
|
|
|
SharedFileProvider.cc
|
|
|
|
)
|
2018-05-14 23:58:11 +02:00
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
|
|
|
else()
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
SerialConnectionProvider.h
|
|
|
|
SerialConnectionProvider.cc
|
|
|
|
MacSerialStream.h
|
|
|
|
MacSerialStream.cc
|
|
|
|
)
|
2019-01-26 19:05:04 +01:00
|
|
|
endif()
|
2019-01-23 19:41:12 +01:00
|
|
|
|
2019-01-09 00:31:32 +01:00
|
|
|
|
2019-11-11 09:58:45 +01:00
|
|
|
if(HAVE_MACTCP)
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
MacTCPStream.h
|
|
|
|
MacTCPStream.cc
|
|
|
|
TCPConnectionProvider.h
|
|
|
|
TCPConnectionProvider.cc
|
|
|
|
)
|
2019-01-09 00:31:32 +01:00
|
|
|
endif()
|
2018-05-14 23:58:11 +02:00
|
|
|
|
2019-08-17 23:49:17 +02:00
|
|
|
if(HAVE_OPENTRANSPORT)
|
|
|
|
list(APPEND CONNECTION_SOURCES
|
|
|
|
OpenTptStream.h
|
|
|
|
OpenTptStream.cc
|
|
|
|
OpenTptConnectionProvider.h
|
|
|
|
OpenTptConnectionProvider.cc
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-11-11 09:58:45 +01: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 21:32:43 +02:00
|
|
|
add_application(LaunchAPPLServer
|
2018-05-06 02:02:29 +02:00
|
|
|
TYPE "APPL"
|
|
|
|
CREATOR "R68L"
|
2019-01-09 00:31:32 +01:00
|
|
|
${MAYBE_CONSOLE}
|
2018-05-06 02:02:29 +02:00
|
|
|
|
2018-04-23 21:32:43 +02:00
|
|
|
LaunchAPPLServer.r
|
2018-05-06 02:02:29 +02:00
|
|
|
LauncherIcon.r
|
2018-04-23 21:32:43 +02:00
|
|
|
LaunchAPPLServer.cc
|
2018-04-27 02:06:54 +02:00
|
|
|
AppLauncher.h
|
2018-05-06 00:56:48 +02:00
|
|
|
AppLauncher.cc
|
2018-05-06 18:49:43 +02:00
|
|
|
ToolLauncher.cc
|
2018-05-19 14:55:27 +02:00
|
|
|
Window.h
|
2018-05-06 18:49:43 +02:00
|
|
|
StatusDisplay.h
|
|
|
|
StatusDisplay.cc
|
2018-05-19 14:55:27 +02:00
|
|
|
AboutBox.h
|
|
|
|
AboutBox.cc
|
2018-05-08 09:43:02 +02:00
|
|
|
ConnectionProvider.h
|
2018-05-14 23:58:11 +02:00
|
|
|
CarbonFileCompat.h
|
2019-01-23 19:41:12 +01:00
|
|
|
Preferences.h
|
|
|
|
Preferences.cc
|
2018-05-09 23:16:45 +02:00
|
|
|
|
2018-05-14 23:58:11 +02:00
|
|
|
${CONNECTION_SOURCES}
|
2018-05-06 18:49:43 +02:00
|
|
|
)
|
2019-01-09 00:31:32 +01:00
|
|
|
if(LAUNCHAPPLSERVER_DEBUG_CONSOLE)
|
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE DEBUG_CONSOLE)
|
|
|
|
endif()
|
2019-08-17 23:49:17 +02:00
|
|
|
if(HAVE_OPENTRANSPORT)
|
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_OPENTRANSPORT)
|
|
|
|
endif()
|
2019-11-11 09:58:45 +01:00
|
|
|
if(HAVE_NAVIGATION)
|
2019-09-09 22:13:28 +02:00
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_NAVIGATION)
|
|
|
|
endif()
|
2019-11-11 09:58:45 +01:00
|
|
|
if(HAVE_MACTCP)
|
2019-09-09 22:13:28 +02:00
|
|
|
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_MACTCP)
|
|
|
|
endif()
|
2018-04-23 01:11:56 +02:00
|
|
|
|
2018-04-21 00:03:29 +02:00
|
|
|
target_link_libraries(LaunchAPPLServer LaunchAPPLCommon)
|
2018-04-27 01:36:33 +02:00
|
|
|
set_target_properties(LaunchAPPLServer PROPERTIES
|
|
|
|
CXX_STANDARD 17
|
|
|
|
)
|
2019-01-04 03:35:32 +01:00
|
|
|
target_compile_options(LaunchAPPLServer PRIVATE -ffunction-sections -Os)
|
2018-05-01 21:17:39 +02: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 02:04:18 +02:00
|
|
|
|
2019-08-17 23:49:17 +02: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 01:22:07 +01:00
|
|
|
if(NAVIGATION_LIBRARY)
|
|
|
|
target_link_libraries(LaunchAPPLServer ${NAVIGATION_LIBRARY})
|
2019-01-24 17:39:10 +01:00
|
|
|
endif()
|