Skip to content

Commit 7f64245

Browse files
committed
refactor CML for src in vcxproj
fix #130
1 parent d2c4d4e commit 7f64245

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ file(GLOB_RECURSE BOOST_HTTP_PROTO_HEADERS CONFIGURE_DEPENDS include/boost/*.hpp
138138
file(GLOB_RECURSE BOOST_HTTP_PROTO_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp)
139139
file(GLOB_RECURSE BOOST_HTTP_PROTO_ZLIB_SOURCES CONFIGURE_DEPENDS src_zlib/*.cpp src_zlib/*.hpp)
140140

141-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BOOST_HTTP_PROTO_HEADERS})
142-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "http_proto" FILES ${BOOST_HTTP_PROTO_SOURCES})
143-
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src_zlib PREFIX "http_proto" FILES ${BOOST_HTTP_PROTO_ZLIB_SOURCES})
141+
source_group("" FILES "include/boost/http_proto.hpp" "build/Jamfile")
142+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost/http_proto PREFIX "include" FILES ${BOOST_HTTP_PROTO_HEADERS})
143+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "src" FILES ${BOOST_HTTP_PROTO_SOURCES})
144+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src_zlib PREFIX "src" FILES ${BOOST_HTTP_PROTO_ZLIB_SOURCES})
144145

145-
add_library(boost_http_proto ${BOOST_HTTP_PROTO_HEADERS} ${BOOST_HTTP_PROTO_SOURCES})
146+
add_library(boost_http_proto include/boost/http_proto.hpp build/Jamfile ${BOOST_HTTP_PROTO_HEADERS} ${BOOST_HTTP_PROTO_SOURCES})
146147
add_library(Boost::http_proto ALIAS boost_http_proto)
147148
target_compile_features(boost_http_proto PUBLIC cxx_constexpr)
148149
target_include_directories(boost_http_proto PUBLIC "${PROJECT_SOURCE_DIR}/include")
150+
target_include_directories(boost_http_proto PRIVATE "${PROJECT_SOURCE_DIR}")
149151
target_link_libraries(boost_http_proto PUBLIC ${BOOST_HTTP_PROTO_DEPENDENCIES})
150152
target_compile_definitions(boost_http_proto PUBLIC BOOST_HTTP_PROTO_NO_LIB)
151153
target_compile_definitions(boost_http_proto PRIVATE BOOST_HTTP_PROTO_SOURCE)
@@ -157,8 +159,10 @@ endif ()
157159

158160
find_package(ZLIB)
159161
if (ZLIB_FOUND)
160-
add_library(boost_http_proto_zlib ${BOOST_HTTP_PROTO_HEADERS} ${BOOST_HTTP_PROTO_ZLIB_SOURCES})
162+
add_library(boost_http_proto_zlib build/Jamfile ${BOOST_HTTP_PROTO_HEADERS} ${BOOST_HTTP_PROTO_ZLIB_SOURCES})
161163
add_library(Boost::http_proto_zlib ALIAS boost_http_proto_zlib)
164+
target_include_directories(boost_http_proto PUBLIC "${PROJECT_SOURCE_DIR}/include")
165+
target_include_directories(boost_http_proto PRIVATE "${PROJECT_SOURCE_DIR}")
162166
target_link_libraries(boost_http_proto_zlib PUBLIC boost_http_proto)
163167
target_link_libraries(boost_http_proto_zlib PRIVATE ZLIB::ZLIB)
164168
target_compile_definitions(boost_http_proto_zlib PUBLIC BOOST_HTTP_PROTO_HAS_ZLIB)

build/Jamfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ lib boost_http_proto
4444
: requirements
4545
<library>/boost//buffers
4646
<library>/boost//url
47+
<include>../
4748
<define>BOOST_HTTP_PROTO_SOURCE
4849
: usage-requirements
4950
<library>/boost//buffers
@@ -59,6 +60,7 @@ lib boost_http_proto_zlib
5960
: requirements
6061
<library>/boost/http_proto//boost_http_proto
6162
[ ac.check-library /zlib//zlib : <library>/zlib//zlib : <build>no ]
63+
<include>../
6264
<define>BOOST_HTTP_PROTO_ZLIB_SOURCE
6365
: usage-requirements
6466
<library>/zlib//zlib

src/detail/filter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ class BOOST_HTTP_PROTO_DECL
133133
} // http_proto
134134
} // boost
135135

136-
#include "impl/filter.hpp"
136+
#include "src/detail/impl/filter.hpp"
137137

138138
#endif

test/limits/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES limits.cpp Jamfile)
1414
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/../../../url/extra PREFIX "_extra" FILES ${TEST_MAIN})
1515
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/../../src PREFIX "_extra" FILES ${LIMITS_SOURCES})
1616
add_executable(boost_http_proto_limits limits.cpp Jamfile ${TEST_MAIN} ${LIMITS_SOURCES})
17+
target_include_directories(boost_http_proto_limits PRIVATE ../../)
1718
target_include_directories(boost_http_proto_limits PRIVATE ../../include ../../../url/extra ../../..)
1819
target_compile_definitions(boost_http_proto_limits PRIVATE
1920
BOOST_HTTP_PROTO_MAX_HEADER=20

0 commit comments

Comments
 (0)