diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-15 18:55:39 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-15 18:55:39 +0800 |
commit | d6a013b29ec9991994a757bbb13c7bb17561550b (patch) | |
tree | 01bc2e5031d53b3c590ae7671097f8b78ec6ed61 /CMakeLists.txt | |
parent | 6c6ff39590407d5fe2e40ed9e7da78c71c372994 (diff) |
Rename qrtclient/client.hxx to qrtclient.hxx
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 35 |
1 files changed, 16 insertions, 19 deletions
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}) |