|
@@ -6,6 +6,7 @@ endif()
|
|
add_library(civetweb-c-library ${LIB_TYPE} civetweb.c)
|
|
add_library(civetweb-c-library ${LIB_TYPE} civetweb.c)
|
|
set_target_properties(civetweb-c-library PROPERTIES
|
|
set_target_properties(civetweb-c-library PROPERTIES
|
|
OUTPUT_NAME "civetweb"
|
|
OUTPUT_NAME "civetweb"
|
|
|
|
+ EXPORT_NAME "civetweb"
|
|
VERSION ${CIVETWEB_VERSION}
|
|
VERSION ${CIVETWEB_VERSION}
|
|
SOVERSION ${CIVETWEB_VERSION}
|
|
SOVERSION ${CIVETWEB_VERSION}
|
|
)
|
|
)
|
|
@@ -14,13 +15,15 @@ if (BUILD_SHARED_LIBS)
|
|
endif()
|
|
endif()
|
|
target_include_directories(
|
|
target_include_directories(
|
|
civetweb-c-library PUBLIC
|
|
civetweb-c-library PUBLIC
|
|
- ${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
|
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
|
|
install(
|
|
install(
|
|
TARGETS civetweb-c-library
|
|
TARGETS civetweb-c-library
|
|
|
|
+ EXPORT ${PROJECT_NAME}-targets
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
- COMPONENT civetweb-c-library)
|
|
|
|
|
|
+ COMPONENT civetweb-c-library
|
|
|
|
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
install(FILES
|
|
install(FILES
|
|
${PROJECT_SOURCE_DIR}/include/civetweb.h
|
|
${PROJECT_SOURCE_DIR}/include/civetweb.h
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
@@ -247,11 +250,13 @@ endif()
|
|
if (CIVETWEB_ENABLE_SERVER_EXECUTABLE)
|
|
if (CIVETWEB_ENABLE_SERVER_EXECUTABLE)
|
|
add_executable(civetweb-c-executable main.c)
|
|
add_executable(civetweb-c-executable main.c)
|
|
set_target_properties(civetweb-c-executable PROPERTIES
|
|
set_target_properties(civetweb-c-executable PROPERTIES
|
|
|
|
+ EXPORT_NAME "server"
|
|
OUTPUT_NAME "civetweb"
|
|
OUTPUT_NAME "civetweb"
|
|
)
|
|
)
|
|
if (CIVETWEB_INSTALL_EXECUTABLE)
|
|
if (CIVETWEB_INSTALL_EXECUTABLE)
|
|
install(
|
|
install(
|
|
TARGETS civetweb-c-executable
|
|
TARGETS civetweb-c-executable
|
|
|
|
+ EXPORT ${PROJECT_NAME}-targets
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
@@ -259,7 +264,7 @@ if (CIVETWEB_ENABLE_SERVER_EXECUTABLE)
|
|
endif()
|
|
endif()
|
|
target_include_directories(
|
|
target_include_directories(
|
|
civetweb-c-executable PUBLIC
|
|
civetweb-c-executable PUBLIC
|
|
- ${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
|
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
|
|
target_link_libraries(civetweb-c-executable civetweb-c-library)
|
|
target_link_libraries(civetweb-c-executable civetweb-c-library)
|
|
if (LIBRT_FOUND)
|
|
if (LIBRT_FOUND)
|
|
target_link_libraries(civetweb-c-executable LIBRT::LIBRT)
|
|
target_link_libraries(civetweb-c-executable LIBRT::LIBRT)
|
|
@@ -275,19 +280,22 @@ if (CIVETWEB_ENABLE_LUA)
|
|
)
|
|
)
|
|
target_include_directories(
|
|
target_include_directories(
|
|
lua-library PUBLIC
|
|
lua-library PUBLIC
|
|
- ${PROJECT_SOURCE_DIR}/src/third_party/lua-5.2.4)
|
|
|
|
|
|
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/third_party/lua-5.2.4>)
|
|
install(
|
|
install(
|
|
TARGETS lua-library
|
|
TARGETS lua-library
|
|
|
|
+ EXPORT ${PROJECT_NAME}-targets
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
- COMPONENT lua-library)
|
|
|
|
|
|
+ COMPONENT lua-library
|
|
|
|
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
endif()
|
|
endif()
|
|
|
|
|
|
# The C++ API library
|
|
# The C++ API library
|
|
if (CIVETWEB_ENABLE_CXX)
|
|
if (CIVETWEB_ENABLE_CXX)
|
|
add_library(civetweb-cpp ${LIB_TYPE} CivetServer.cpp)
|
|
add_library(civetweb-cpp ${LIB_TYPE} CivetServer.cpp)
|
|
set_target_properties(civetweb-cpp PROPERTIES
|
|
set_target_properties(civetweb-cpp PROPERTIES
|
|
|
|
+ EXPORT_NAME "civetweb-cpp"
|
|
OUTPUT_NAME "civetweb-cpp"
|
|
OUTPUT_NAME "civetweb-cpp"
|
|
VERSION ${CIVETWEB_VERSION}
|
|
VERSION ${CIVETWEB_VERSION}
|
|
SOVERSION ${CIVETWEB_VERSION}
|
|
SOVERSION ${CIVETWEB_VERSION}
|
|
@@ -300,13 +308,15 @@ if (CIVETWEB_ENABLE_CXX)
|
|
civetweb-c-library)
|
|
civetweb-c-library)
|
|
target_include_directories(
|
|
target_include_directories(
|
|
civetweb-cpp PUBLIC
|
|
civetweb-cpp PUBLIC
|
|
- ${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
|
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
|
|
install(
|
|
install(
|
|
TARGETS civetweb-cpp
|
|
TARGETS civetweb-cpp
|
|
|
|
+ EXPORT ${PROJECT_NAME}-targets
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
- COMPONENT civetweb-cpp)
|
|
|
|
|
|
+ COMPONENT civetweb-cpp
|
|
|
|
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
install(FILES
|
|
install(FILES
|
|
${PROJECT_SOURCE_DIR}/include/CivetServer.h
|
|
${PROJECT_SOURCE_DIR}/include/CivetServer.h
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|