fix static build
Add BUILD_SHARED_LIBS and BUILD_STATIC_LIBS to allow the user to build a static only version Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
1 parent
b2501c318a
commit
4d0f435e0b
2 files changed
+31
-13
No files matched your search
@@ -1,4 +1,9 @@
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/buffer ${CMAKE_BINARY_DIR}/src ${LIBEV_INCLUDE_DIR})
|
||||
|
||||
add_executable(example example.c)
|
||||
target_link_libraries(example uhttpd ${LIBEV_LIBRARY})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries(example uhttpd ${LIBEV_LIBRARY})
|
||||
else()
|
||||
target_link_libraries(example uhttpd_s ${LIBEV_LIBRARY})
|
||||
endif()
|
||||
Reference in new issue
Block a user