Skip to content

Commit 7268dc9

Browse files
committed
Would be easier if there was a .pc file.
1 parent 4d66be7 commit 7268dc9

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

modules/openapi-generator/src/main/resources/cpp-oatpp-server/cmake.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ add_executable(${PROJECT_NAME} ${SRCS})
3030
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
3131

3232
{{#addExternalLibs}}add_dependencies(${PROJECT_NAME} OATPP)
33-
target_link_libraries(${PROJECT_NAME} ${EXTERNAL_INSTALL_LOCATION}/lib/oatpp-1.3.0/liboatpp.a){{/addExternalLibs}}
33+
if(WIN32)
34+
target_link_libraries(${PROJECT_NAME} ${EXTERNAL_INSTALL_LOCATION}/lib/oatpp-1.3.0/liboatpp.lib)
35+
else()
36+
target_link_libraries(${PROJECT_NAME} ${EXTERNAL_INSTALL_LOCATION}/lib/oatpp-1.3.0/liboatpp.a)
37+
endif(WIN32){{/addExternalLibs}}

samples/server/petstore/cpp-oatpp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ add_executable(${PROJECT_NAME} ${SRCS})
2828
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
2929

3030
add_dependencies(${PROJECT_NAME} OATPP)
31+
if(WIN32)
32+
target_link_libraries(${PROJECT_NAME} ${EXTERNAL_INSTALL_LOCATION}/lib/oatpp-1.3.0/liboatpp.lib)
33+
else()
3134
target_link_libraries(${PROJECT_NAME} ${EXTERNAL_INSTALL_LOCATION}/lib/oatpp-1.3.0/liboatpp.a)
35+
endif(WIN32)

0 commit comments

Comments
 (0)