2019-11-11 23:56:03 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2023-02-04 23:37:30 +00:00
|
|
|
#set (CMAKE_VERBOSE_MAKEFILE "1")
|
|
|
|
|
2019-11-12 03:51:26 +00:00
|
|
|
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
2023-02-04 23:37:30 +00:00
|
|
|
set(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
#set (CMAKE_C_COMPILER /usr/bin/clang)
|
|
|
|
#set (CMAKE_CXX_COMPILER /usr/bin/clang)
|
|
|
|
|
2019-11-11 23:56:03 +00:00
|
|
|
|
2019-11-13 05:03:41 +00:00
|
|
|
project(QAsm)
|
|
|
|
|
2023-02-04 23:37:30 +00:00
|
|
|
set(CIDER "1")
|
2019-11-17 02:27:19 +00:00
|
|
|
|
2019-11-15 10:56:43 +00:00
|
|
|
set(APPVERSION "4.0.9")
|
2019-11-11 23:56:03 +00:00
|
|
|
set(LIBRARY_NAME pal)
|
2019-11-13 05:03:41 +00:00
|
|
|
set(FIND_LIBRARY_USE_LIB64_PATHS TRUE)
|
2019-11-11 23:56:03 +00:00
|
|
|
|
2023-02-04 23:37:30 +00:00
|
|
|
|
|
|
|
#message("root: ${PROJECT_ROOT}")
|
|
|
|
#include(./lib${LIBRARY_NAME}/cmake/CMakeHeader.txt)
|
2019-11-17 01:36:22 +00:00
|
|
|
|
2019-11-15 01:07:26 +00:00
|
|
|
set ( PROJECT_NAME "qasm" )
|
2019-11-11 23:56:03 +00:00
|
|
|
|
|
|
|
set(SOURCE
|
2019-11-15 01:07:26 +00:00
|
|
|
${PROJECT_ROOT}/${PROJECT_NAME}.cpp
|
2019-11-11 23:56:03 +00:00
|
|
|
${PROJECT_ROOT}/asm.cpp
|
|
|
|
${PROJECT_ROOT}/opcodes.cpp
|
|
|
|
${PROJECT_ROOT}/eval.cpp
|
2019-11-13 01:03:51 +00:00
|
|
|
${PROJECT_ROOT}/psuedo.cpp
|
2019-11-11 23:56:03 +00:00
|
|
|
)
|
|
|
|
|
2019-11-15 11:10:41 +00:00
|
|
|
#find_package(OpenSSL REQUIRED)
|
2023-02-04 23:37:30 +00:00
|
|
|
find_package( Poco REQUIRED Foundation Util JSON)
|
2019-11-17 06:48:24 +00:00
|
|
|
|
|
|
|
if ( ${CIDER} )
|
2019-11-17 02:27:19 +00:00
|
|
|
find_package( ZLIB )
|
2019-11-17 06:48:24 +00:00
|
|
|
endif ( ${CIDER} )
|
2019-11-13 01:03:51 +00:00
|
|
|
|
2019-11-11 23:56:03 +00:00
|
|
|
include_directories(BEFORE
|
|
|
|
${PROJECT_ROOT}
|
|
|
|
${PROJECT_ROOT}/lib${LIBRARY_NAME}/include/${LIBRARY_NAME}
|
2023-02-04 23:37:30 +00:00
|
|
|
#${PROJECT_ROOT}/libpal/pal/include
|
2019-11-15 11:10:41 +00:00
|
|
|
#${OPENSSL_INCLUDE_DIR}
|
2019-11-13 05:03:41 +00:00
|
|
|
${Poco_INCLUDE_DIRS}
|
2019-11-11 23:56:03 +00:00
|
|
|
)
|
|
|
|
|
2023-02-04 23:37:30 +00:00
|
|
|
#include(${PROJECT_ROOT}/lib${LIBRARY_NAME}/cmake/CMakeApp.txt)
|
2019-11-17 02:27:19 +00:00
|
|
|
|
|
|
|
set (CIDERLIBS "" )
|
|
|
|
if ( ${CIDER} )
|
|
|
|
add_definitions(-DCIDERPRESS)
|
2023-02-04 23:37:30 +00:00
|
|
|
include_directories(AFTER ${PROJECT_ROOT}/diskimg)
|
|
|
|
add_subdirectory(${PROJECT_ROOT}/libhfs)
|
|
|
|
add_subdirectory(${PROJECT_ROOT}/nufxlib)
|
|
|
|
add_subdirectory(${PROJECT_ROOT}/diskimg)
|
|
|
|
|
2019-11-17 01:36:22 +00:00
|
|
|
|
2019-11-17 02:27:19 +00:00
|
|
|
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} )
|
2019-11-11 23:56:03 +00:00
|
|
|
|
2023-02-04 23:37:30 +00:00
|
|
|
add_subdirectory(${PROJECT_ROOT}/libpal)
|
2019-11-11 23:56:03 +00:00
|
|
|
|
|
|
|
add_executable( ${PROJECT_NAME} ${SOURCE})
|
|
|
|
|
|
|
|
target_link_libraries (
|
|
|
|
${PROJECT_NAME}
|
|
|
|
${LIBRARY_NAME}
|
|
|
|
pthread
|
2019-11-17 02:27:19 +00:00
|
|
|
${CIDERLIBS}
|
2019-11-12 03:51:26 +00:00
|
|
|
${Poco_LIBRARIES}
|
2019-11-11 23:56:03 +00:00
|
|
|
)
|
|
|
|
|
2023-02-04 23:37:30 +00:00
|
|
|
#include(./lib${LIBRARY_NAME}/cmake/CMakeCommands.txt)
|
2019-11-11 23:56:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|