vcpkg๋ฅผ ์ฐ์
ํญ์ C/C++ ๊ฐ๋ฐ์๋ค์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก ์ธํด ๊ณ ํต๋ฐ์ต๋๋ค. ํ๋ซํผ ์ข ์์ ์ด๋ฉด์ ๋ฌด๊ตฌํ ์ญ์ฌ๋ฅผ ๊ฐ์ง ์ธ์ด์ด๊ธฐ ๋๋ฌธ์ ๋น๊ต์ ์ต๊ทผ์ ๋์จ ์ธ์ด์ ๋ฌ๋ฆฌ ์๋ํํฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ์ฉํ๊ธฐ๊ฐ ๊น๋ค๋ก์ ์ฃ .
node์ง์์ npm๊น์ง๋ ์๋์ง๋ง C/C++์ง์์์๋ MS๊ฐ ๋ง๋ vcpkg๋ฅผ ์ฐ๋๊ฒ ๊ทธ๋๋ง ํ๋ชจ์ ์๋๋ฅผ ๋ฆ์ถฐ์ค ๊ฒ์ ๋๋ค.
vcpkg์ ๊ณต์ ํํ์ด์ง๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
https://vcpkg.io/en/index.html
vcpkg - Open source C/C++ dependency manager from Microsoft
Easy To Use Download and build popular libraries in a single step. Never worry about upstream dependencies or version conflicts. Declare dependencies with commandline actions or in a manifest that can live with your repo. Get support from the development t
vcpkg.io
https://github.com/microsoft/vcpkg
GitHub - microsoft/vcpkg: C++ Library Manager for Windows, Linux, and MacOS
C++ Library Manager for Windows, Linux, and MacOS. Contribute to microsoft/vcpkg development by creating an account on GitHub.
github.com
๊ณตํ์ ๋์จ ์ค์น๊ฐ์ด๋๋ฅผ ์ฐจ๋ถํ ๋ฐ๋ผ๊ฐ๋ฉด ์ด๋ ต์ง ์๊ฒ vcpkg๋ฅผ ์ค์นํ ์ ์์ผ๋ฉฐ, vcpkg install xxxx ๋ช ๋ น์ด๋ฅผ ํตํด ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ์ฉํ ์ ์์ต๋๋ค.
Linux, windows ๋ชจ๋ ์ง์ํ๋ฉฐ, ํนํ windows์์๋ ์ฐฐ๋ก ๊ถํฉ์ ์๋ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.(์ญ์ MSํธํ..) vcpkg๋ก ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์นํ๋ฉด ํค๋ํ์ผ include path๋ฅผ ๋ฐ๋ก ์ก์์ค์ ์ฆ์ ์ฝ๋์ ์ ์ฉํ ์ ์์ต๋๋ค. ๋งํน์์๋ ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ํ์๋ก ํ๋ lib์ ์๋์ผ๋ก ๋งํฌํ๊ธฐ ๋๋ฌธ์ ๋น๋์ ์ด๋ ค์์ด ์์ต๋๋ค. ์ฌ์ง์ด ๋์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ(dll)๋ ๋น๋ ํ ์คํํ์ผ์ด ์๋ ์์น์ ์๋์ผ๋ก ๋ณต์ฌ๊น์ง ๋ฉ๋๋ค.
์ ๊ฐ ์ฌํ๊น์ง vcpkg๋ก ์ค์นํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ jsoncpp, cpp-redis, IXWebsocket, grpc ์ ๋๊ฐ ์๊ฒ ๋ค์. ๊ทธ ์ธ์๋ vcpkg search xxxx๋ก ์ด๋ค ํจํค์ง๋ค์ด ์ฌ๋ผ์์๋ ์ง ํ์ธํด๋ณผ ์ ์์ต๋๋ค.
๊ฐ์ธ์ ์ผ๋ก cmake๋ฅผ ์ซ์ดํ๋ ์ฌ๋์ผ๋ก์ vcpkg์ ์ํฅ๋ ฅ์ด ํ๋๋๋ ๊ฒ์ด ๋๋ฌด ์ข๋ค์. ์๊ฐ๋๋ค๋ฉด ๋ค์์ ์ ๊ฐ ์ค์นํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค์ ์ค์น๊ณผ์ ์ ์ฌ๋ ค๋ณด๋ ค๊ณ ํฉ๋๋ค. ๋๊ตฐ๊ฐ์๊ฒ ๋์์ด ๋๊ธธ ๋ฐ๋ผ๋ฉฐ...