2022-03-05 12:44:06 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project(libsql CXX)
|
|
|
|
|
|
|
|
# Find source files
|
|
|
|
file(GLOB SOURCES
|
|
|
|
"src/*.cpp"
|
|
|
|
"include/*.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Include header files
|
|
|
|
include_directories("include")
|
|
|
|
|
|
|
|
# Create shared library
|
|
|
|
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
|
|
|
|
|
|
|
# Find dependencies
|
|
|
|
find_package(libmysql REQUIRED)
|
2022-03-09 21:30:51 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${MYSQL_LIBRARIES})
|
2022-03-05 12:44:06 +02:00
|
|
|
|
2022-03-09 21:30:51 +02:00
|
|
|
find_package(Boost REQUIRED)
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${Boost_LIBRARIES})
|