Browse Source

Rearrange cmakelists.txt more logically

pull/3/head
Jason Rhinelander 2 years ago
parent
commit
e1e8b85de6
  1. 30
      CMakeLists.txt

30
CMakeLists.txt

@ -18,6 +18,8 @@ option(BUILD_SHARED_LIBS "Build shared libraries instead of static ones" ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
configure_file(lokimq/version.h.in lokimq/version.h @ONLY)
add_library(lokimq
lokimq/auth.cpp
lokimq/batch.cpp
@ -30,21 +32,6 @@ add_library(lokimq
)
set_target_properties(lokimq PROPERTIES SOVERSION ${LOKIMQ_LIBVERSION})
configure_file(lokimq/version.h.in lokimq/version.h @ONLY)
install(
FILES lokimq/auth.h
lokimq/batch.h
lokimq/bt_serialize.h
lokimq/connections.h
lokimq/hex.h
lokimq/lokimq.h
lokimq/message.h
lokimq/string_view.h
${CMAKE_CURRENT_BINARY_DIR}/lokimq/version.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq
)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(lokimq PRIVATE Threads::Threads)
@ -111,6 +98,19 @@ install(
DESTINATION lib
)
install(
FILES lokimq/auth.h
lokimq/batch.h
lokimq/bt_serialize.h
lokimq/connections.h
lokimq/hex.h
lokimq/lokimq.h
lokimq/message.h
lokimq/string_view.h
${CMAKE_CURRENT_BINARY_DIR}/lokimq/version.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq
)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(lokimq_IS_TOPLEVEL_PROJECT TRUE)
else()

Loading…
Cancel
Save