From 02bdd29e79280341cf4844f851eb83d211697394 Mon Sep 17 00:00:00 2001 From: marketideas Date: Sat, 16 Nov 2019 18:27:19 -0800 Subject: [PATCH] test --- CMakeLists.txt | 23 +++++++++++++++++------ qasm.cpp | 10 ++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b208ae4..20ee519 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") project(QAsm) +set(CIDER "0") + set(CMAKE_BUILD_TYPE DEBUG) set(APPVERSION "4.0.9") set(LIBRARY_NAME pal) @@ -21,31 +23,40 @@ set(SOURCE ) #find_package(OpenSSL REQUIRED) -find_package(Poco REQUIRED Foundation Util XML JSON ) +find_package( Poco REQUIRED Foundation Util XML JSON ) +find_package( ZLIB ) include_directories(BEFORE ${PROJECT_ROOT} ${PROJECT_ROOT}/lib${LIBRARY_NAME}/include/${LIBRARY_NAME} - ${PROJECT_ROOT}/ciderpress/diskimg #${OPENSSL_INCLUDE_DIR} ${Poco_INCLUDE_DIRS} ) +include(${PROJECT_ROOT}/lib${LIBRARY_NAME}/cmake/CMakeApp.txt) + +set (CIDERLIBS "" ) +if ( ${CIDER} ) +add_definitions(-DCIDERPRESS) +include_directories(AFTER ${PROJECT_ROOT}/ciderpress/diskimg) add_subdirectory(${PROJECT_ROOT}/ciderpress/nufxlib) add_subdirectory(${PROJECT_ROOT}/ciderpress/diskimg) -add_subdirectory(${PROJECT_ROOT}/lib${LIBRARY_NAME}) +find_library(DISKIMG_LIB libnufx_static.a ${PROJECT_ROOT}/build ) +find_library(HFS_LIB libnufx_static.a ${PROJECT_ROOT}/build ) +find_library(NUFX_LIB libnufx_static.a ${PROJECT_ROOT}/build ) +set (CIDERLIBS diskimg_static hfs_static nufx_static ${ZLIB_LIBRARIES}) +endif ( ${CIDER} ) -include(${PROJECT_ROOT}/lib${LIBRARY_NAME}/cmake/CMakeApp.txt) +add_subdirectory(${PROJECT_ROOT}/lib${LIBRARY_NAME}) add_executable( ${PROJECT_NAME} ${SOURCE}) -#link_directories( ${link_directories} ./build/ciderpress/diskimg target_link_libraries ( ${PROJECT_NAME} ${LIBRARY_NAME} pthread -${PROJECT_ROOT}/ciderpress/diskimg +${CIDERLIBS} ${Poco_LIBRARIES} ) diff --git a/qasm.cpp b/qasm.cpp index 4f60331..958c157 100644 --- a/qasm.cpp +++ b/qasm.cpp @@ -1,6 +1,8 @@ #include "app.h" #include "asm.h" +#ifdef CIDERPRESS #include "DiskImg.h" +#endif #define CLASS PAL_APPCLASS @@ -29,6 +31,14 @@ void CLASS::displayVersion() s = "-debug"; #endif cerr << "quickASM 16++ v" << (std::string)STRINGIFY(APPVERSION) << s << endl; + +#ifdef CIDERPRESS + DiskImgLib::Global::AppInit(); + DiskImgLib::DiskImg prodos; + + DiskImgLib::Global::AppCleanup(); +#endif + } int CLASS::runServerApp(PAL_EVENTMANAGER *em)