This repository is a fork of original oatpp-swagger 669d8e4 conan recipe. This fork fixes missing headers bug as well as updates the Oat++ dependency to oatpp/1.3.0.latest.
shared- builds dynamically linked targetsfPIC- enables Position Independent Code, used in conjunction with shared
Important
Only run the following commands inside the root directory of this project.
Warning
Running the following commands outside the root directory of this project will either fail or create conan packages for other conan recipes.
To build the package locally, run the following command inside the project root:
conan create . --version=1.3.0 --user=hahn-schickard --channel=stable --build=missing
Important
DO NOT use the following instructions inside this project directory. Only run the following commands outside this project directory.
Warning
Running the following commands inside this project directory will fail.
To consume the package, define either conanfile.txt or conanfile.py files in your project and use conan to install the package.
This can be done by running the following in your project directory:
conan install . --output-folder=build --build=missing
This will install all of the dependencies inside the build directory, from which you can run the following cmake command to generate your build rules:
cmake .. -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake"
And once that is successful, the following cmake command to build your project:
cmake --build .
[requires]
oatpp-swagger/1.3.0@hahn-schickard/stable
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
[options]
oatpp-swagger/*:shared=False
oatpp-swagger/*:fPIC=Truefrom conan import ConanFile
from conan.tools.cmake import cmake_layout
class ExampleRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"
def requirements(self):
self.requires("oatpp-swagger/1.3.0@hahn-schickard/stable")
def configure(self):
self.options["oatpp-swagger/*"].shared=False
self.options["oatpp-swagger/*"].fPIC=True
def layout(self):
cmake_layout(self)Once installed, conan will provide the cmake package and targets. This will be exposed as a standard CMake package.
Add the following line to your CMakeLists.txt to find the package:
find_package(oatpp-swagger REQUIRED)Add the following line to your CMakeLists.txt to link the library to your target:
target_link_libraries(YOUR_TARGET oatpp-swagger::oatpp-swagger)