diff options
| author | ab <ab@acunetix.com> | 2016-12-05 17:09:33 +0100 |
|---|---|---|
| committer | ab <ab@acunetix.com> | 2016-12-05 17:09:33 +0100 |
| commit | f62ad96c9ab7f09c80c42a95fee3dfd160fa825c (patch) | |
| tree | 9b46674822113b7a9d24992f7b41419a52a86942 | |
| parent | 89314e013280b5dceec13ec034b38324cbed3e08 (diff) | |
| download | vcpkg-f62ad96c9ab7f09c80c42a95fee3dfd160fa825c.tar.gz vcpkg-f62ad96c9ab7f09c80c42a95fee3dfd160fa825c.zip | |
Update the cmakelists to build shared and static libraries properly.
| -rw-r--r-- | ports/http-parser/CMakeLists.txt | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt index 021b1842f..6e9067a04 100644 --- a/ports/http-parser/CMakeLists.txt +++ b/ports/http-parser/CMakeLists.txt @@ -1,22 +1,17 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.4) project (http-parser) -set(PUBLIC_HDRS - http_parser.h -) -set(PRIVATE_HDRS -) -set(SRCS - http_parser.c -) +if (BUILD_SHARED_LIBS) + SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() -add_library(http_parser STATIC ${SRCS} ${PUBLIC_HDRS} ${PRIAVTE_HDRS}) +add_library(http_parser http_parser.c http_parser.h) -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS http_parser - ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" ) -endif() +install(TARGETS http_parser + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" + ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +) -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) - install(FILES ${PUBLIC_HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +if (NOT SKIP_INSTALL_HEADERS) + install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include") endif()
\ No newline at end of file |
