diff --git a/CMakeLists.txt b/CMakeLists.txt index dca43b3..694d932 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_ # Build a shared library by default option(BUILD_SHARED_LIBS "Build QHttpEngine as a shared library" ON) option(BUILD_AGAINST_QT6 "Build against Qt6" ON) +option(BUILD_FOR_LABMCT "Build for LabMCT" OFF) + +set(BUILD_FOR_LABMCT ON) set(BIN_INSTALL_DIR bin CACHE STRING "Binary runtime installation directory relative to the install prefix") set(LIB_INSTALL_DIR lib CACHE STRING "Library installation directory relative to the install prefix") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dca9e77..fa0fe26 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,13 +42,13 @@ endif() add_library(qhttpengine ${HEADERS} ${SRC}) set_target_properties(qhttpengine PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON DEFINE_SYMBOL QT_NO_SIGNALS_SLOTS_KEYWORDS DEFINE_SYMBOL QHTTPENGINE_LIBRARY PUBLIC_HEADER "${HEADERS}" VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR} + #SOVERSION ${PROJECT_VERSION_MAJOR} ) target_include_directories(qhttpengine PUBLIC @@ -63,6 +63,11 @@ else() target_link_libraries(qhttpengine Qt${QT_VERSION_MAJOR}::Network) endif() +if(BUILD_FOR_LABMCT) + set_target_properties(qhttpengine PROPERTIES + INSTALL_RPATH "${LABMCT_RPATH}") + install(TARGETS qhttpengine LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) +else() install(TARGETS qhttpengine EXPORT qhttpengine-export RUNTIME DESTINATION "${BIN_INSTALL_DIR}" LIBRARY DESTINATION "${LIB_INSTALL_DIR}" @@ -90,3 +95,4 @@ configure_file(qhttpengine.pc.in "${CMAKE_CURRENT_BINARY_DIR}/qhttpengine.pc" @O install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qhttpengine.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" ) +endif() \ No newline at end of file