Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: cmake and windows build (or better say x-platform)

$
0
0
hi,
I created a library on Mac that uses Casablanca. And now fighting compiling this library on Windows but it seems Casablabca does not support CMake building on Windows, is this correct?

In CMakeLists.txt in section "# Compiler (not platform) specific settings" I see section for Android, IOS/Clang, Gnu and "Unknown compiler, success is doubtful" that Microsoft compiler will fall into.

What is supposed workflow for cross platform projects?

In Mac build I just added Casablanca into subfolder and put
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared Libraries.")
set(BUILD_TESTS OFF CACHE BOOL "Build tests.")
set(BUILD_SAMPLES OFF CACHE BOOL "Build samples.")
add_subdirectory(external/casablanca/Release)

# Get the Casablanca properties from the Casablanca subdirectory
get_directory_property(Casablanca_LIBRARY
    DIRECTORY external/casablanca/Release
    DEFINITION Casablanca_LIBRARY)

get_directory_property(Casablanca_INCLUDE_DIR
    DIRECTORY external/casablanca/Release
    DEFINITION Casablanca_INCLUDE_DIR)
message(STATUS "casablanca lib dir: ${Casablanca_LIBRARY}")
message(STATUS "casablanca inc dir: ${Casablanca_INCLUDE_DIR}")
this way everything compiles smoothly on Mac and when i run same cmake step on Windows I first get "Unknown compiler..." and error that "You have called ADD_LIBRARY for library libcpprest without any source filed..."

Any ideas what to look or how to redo my workflow?


Thank you!

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>