libqbase/CMakeLists.txt

37 lines
871 B
CMake
Raw Normal View History

2023-09-04 09:23:29 +03:00
cmake_minimum_required(VERSION 3.0)
2023-09-12 09:28:42 +03:00
project(baselib VERSION 0.0.1)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2023-09-04 09:23:29 +03:00
set(SOURCES
2023-09-12 09:28:42 +03:00
src/logger/consolelogger.cpp
src/logger/filelogger.cpp
src/logger/logger.cpp
src/logger/loggermanager.cpp
src/logger/sysloglogger.cpp)
2023-09-04 09:23:29 +03:00
2023-09-12 09:28:42 +03:00
add_library(baselib SHARED ${SOURCES})
set_target_properties(baselib PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1)
target_include_directories(baselib PRIVATE include)
find_package(
Qt5
COMPONENTS Core
REQUIRED)
target_include_directories(baselib PUBLIC ${Qt5Gui_INCLUDE_DIRS})
target_link_libraries(baselib Qt5::Core)
include(GNUInstallDirs)
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_PROJECT_NAME}/"
FILES_MATCHING
PATTERN "*.h")
install(
TARGETS baselib
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
2023-09-04 09:23:29 +03:00