From d6a013b29ec9991994a757bbb13c7bb17561550b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 15 Jan 2022 18:55:39 +0800 Subject: Rename qrtclient/client.hxx to qrtclient.hxx --- CMakeLists.txt | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bee888..ba130f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,37 +1,34 @@ cmake_minimum_required(VERSION 3.5) - project(qrtclient) - set(CMAKE_AUTOMOC ON) - find_package(Qt5Core) - -add_library(${PROJECT_NAME} SHARED +set(HDRS ${PROJECT_NAME}/user.hxx ${PROJECT_NAME}/ticket.hxx ${PROJECT_NAME}/tickethistory.hxx - ${PROJECT_NAME}/client.hxx + ) +set(SRCS + ${PROJECT_NAME}.hxx + ${HDRS} user.cxx ticket.cxx tickethistory.cxx client.cxx ) - -if (APPLE) +if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") include_directories(/usr/local/include) - target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/lib) + link_directories(/usr/local/lib) +endif() +if (EMSCRIPTEN OR IOS) + add_library(${PROJECT_NAME} STATIC ${SRCS}) +else() + add_library(${PROJECT_NAME} SHARED ${SRCS}) endif() - target_link_libraries(${PROJECT_NAME} Qt5::Core rtclient ) - -install(TARGETS ${PROJECT_NAME} DESTINATION lib) -install(FILES - ${PROJECT_NAME}/user.hxx - ${PROJECT_NAME}/ticket.hxx - ${PROJECT_NAME}/tickethistory.hxx - ${PROJECT_NAME}/client.hxx - DESTINATION include/${PROJECT_NAME} - ) +include(GNUInstallDirs) +install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(FILES ${PROJECT_NAME}.hxx DESTINATION include) +install(FILES ${HDRS} DESTINATION include/${PROJECT_NAME}) -- cgit v1.2.3