mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-25 14:34:29 +00:00
Don't fail LaunchAPPLServer 68K build if OpenTpt libs are unavailable
This commit is contained in:
parent
2a5bd9b5fa
commit
54201b2733
@ -1,9 +1,19 @@
|
||||
set(CONNECTION_SOURCES
|
||||
OpenTptStream.h
|
||||
OpenTptStream.cc
|
||||
OpenTptConnectionProvider.h
|
||||
OpenTptConnectionProvider.cc
|
||||
set(HAVE_OPENTRANSPORT NO)
|
||||
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)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
|
||||
set(CONNECTION_SOURCES
|
||||
SharedFileStream.h
|
||||
SharedFileStream.cc
|
||||
SharedFileProvider.h
|
||||
@ -32,6 +42,15 @@ if(LAUNCHAPPLSERVER_DEBUG_CONSOLE)
|
||||
set(MAYBE_CONSOLE "CONSOLE")
|
||||
endif()
|
||||
|
||||
if(HAVE_OPENTRANSPORT)
|
||||
list(APPEND CONNECTION_SOURCES
|
||||
OpenTptStream.h
|
||||
OpenTptStream.cc
|
||||
OpenTptConnectionProvider.h
|
||||
OpenTptConnectionProvider.cc
|
||||
)
|
||||
endif()
|
||||
|
||||
add_application(LaunchAPPLServer
|
||||
TYPE "APPL"
|
||||
CREATOR "R68L"
|
||||
@ -58,6 +77,9 @@ add_application(LaunchAPPLServer
|
||||
if(LAUNCHAPPLSERVER_DEBUG_CONSOLE)
|
||||
target_compile_definitions(LaunchAPPLServer PRIVATE DEBUG_CONSOLE)
|
||||
endif()
|
||||
if(HAVE_OPENTRANSPORT)
|
||||
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_OPENTRANSPORT)
|
||||
endif()
|
||||
|
||||
target_link_libraries(LaunchAPPLServer LaunchAPPLCommon)
|
||||
set_target_properties(LaunchAPPLServer PROPERTIES
|
||||
@ -74,11 +96,20 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(HAVE_OPENTRANSPORT)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
||||
target_link_libraries(LaunchAPPLServer -lOpenTransportAppPPC -lOpenTransportLib -lOpenTptInternetLib -lNavigationLib)
|
||||
target_link_libraries(LaunchAPPLServer -lOpenTransportAppPPC -lOpenTransportLib -lOpenTptInternetLib)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
target_link_libraries(LaunchAPPLServer -lOpenTransport -lOpenTransportApp -lOpenTptInet -lNavigation.far)
|
||||
target_link_libraries(LaunchAPPLServer -lOpenTransport -lOpenTransportApp -lOpenTptInet)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
||||
target_link_libraries(LaunchAPPLServer -lNavigationLib)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
target_link_libraries(LaunchAPPLServer -lNavigation.far)
|
||||
endif()
|
||||
|
||||
if(FALSE)
|
||||
|
@ -46,7 +46,9 @@
|
||||
#include "SerialConnectionProvider.h"
|
||||
#include "TCPConnectionProvider.h"
|
||||
#endif
|
||||
#ifdef HAVE_OPENTRANSPORT
|
||||
#include "OpenTptConnectionProvider.h"
|
||||
#endif
|
||||
#include "SharedFileProvider.h"
|
||||
|
||||
#include "SystemInfo.h"
|
||||
@ -76,7 +78,11 @@ enum
|
||||
#if TARGET_API_MAC_CARBON
|
||||
bool portsAvailable[] = { false, false, false, false, true };
|
||||
#else
|
||||
#ifdef HAVE_OPENTRANSPORT
|
||||
bool portsAvailable[] = { true, true, false, false, true };
|
||||
#else
|
||||
bool portsAvailable[] = { true, false, false, false, true };
|
||||
#endif
|
||||
#endif
|
||||
bool hasIconUtils = true;
|
||||
bool hasColorQD = true;
|
||||
@ -577,9 +583,11 @@ void ConnectionChanged()
|
||||
connection = std::make_unique<SerialConnectionProvider>(0, gPrefs.baud, statusDisplay.get());
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_OPENTRANSPORT
|
||||
case Port::openTptTCP:
|
||||
connection = std::make_unique<OpenTptConnectionProvider>(statusDisplay.get());;
|
||||
break;
|
||||
#endif
|
||||
case Port::sharedFiles:
|
||||
if(gPrefs.sharedDirectoryPath[0] == 0)
|
||||
{
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/m68k-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/m68k-apple-macos/" )
|
||||
|
||||
set( MAKE_APPL "@CMAKE_BINARY_DIR@/MakeAPPL/MakeAPPL" )
|
||||
set( REZ "@CMAKE_BINARY_DIR@/Rez/Rez" )
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/powerpc-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/powerpc-apple-macos/" )
|
||||
|
||||
set( MAKE_PEF "@CMAKE_BINARY_DIR@/PEFTools/MakePEF" )
|
||||
set( MAKE_IMPORT "@CMAKE_BINARY_DIR@/PEFTools/MakeImport" )
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/powerpc-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/powerpc-apple-macos/" )
|
||||
|
||||
set( MAKE_PEF "@CMAKE_BINARY_DIR@/PEFTools/MakePEF" )
|
||||
set( MAKE_IMPORT "@CMAKE_BINARY_DIR@/PEFTools/MakeImport" )
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/m68k-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/m68k-apple-macos/" )
|
||||
|
||||
set( MAKE_APPL "${RETRO68_ROOT}/bin/MakeAPPL" )
|
||||
set( REZ "${RETRO68_ROOT}/bin/Rez" )
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/powerpc-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/powerpc-apple-macos/" )
|
||||
|
||||
set( MAKE_PEF "${RETRO68_ROOT}/bin/MakePEF" )
|
||||
set( MAKE_IMPORT "${RETRO68_ROOT}/bin//MakeImport" )
|
||||
|
@ -20,6 +20,7 @@ set( CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set( RETRO68_ROOT "@RETRO68_ROOT@" CACHE PATH "path to root of Retro68 Toolchain" )
|
||||
set( CMAKE_INSTALL_PREFIX "${RETRO68_ROOT}/powerpc-apple-macos/" CACHE PATH "installation prefix" )
|
||||
set( CMAKE_SYSTEM_PREFIX_PATH "${RETRO68_ROOT}/powerpc-apple-macos/" )
|
||||
|
||||
set( MAKE_PEF "${RETRO68_ROOT}/bin/MakePEF" )
|
||||
set( MAKE_IMPORT "${RETRO68_ROOT}/bin//MakeImport" )
|
||||
|
Loading…
Reference in New Issue
Block a user