From: Александр Першин Date: Fri, 7 Aug 2020 09:42:14 +0000 (+0300) Subject: fix msvc 2019 build X-Git-Tag: submit/tizen/20200809.214919^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f35f0d9a2824826f251b97bc16e343714513b3e1;p=platform%2Fcore%2Fuifw%2Flottie-player.git fix msvc 2019 build --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c9b21f2..21bcefb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ target_include_directories(rlottie "${CMAKE_CURRENT_BINARY_DIR}" ) -#declare target compilation options +#declare common target compilation options target_compile_options(rlottie PUBLIC PRIVATE @@ -56,14 +56,26 @@ target_compile_options(rlottie -fno-asynchronous-unwind-tables -fno-rtti -Wall - -Werror - -Wextra - -Wnon-virtual-dtor - -Woverloaded-virtual - -Wno-unused-parameter -fvisibility=hidden ) +#MSVC does not recognize these parameters +if (NOT WIN32) + target_compile_options(rlottie + PUBLIC + PRIVATE + -Werror + -Wextra + -Wnon-virtual-dtor + -Woverloaded-virtual + -Wno-unused-parameter + ) +endif() + +if (WIN32 AND NOT BUILD_SHARED_LIBS) + target_compile_definitions(rlottie PUBLIC -DLOT_BUILD=0) +endif() + #declare dependancy set( CMAKE_THREAD_PREFER_PTHREAD TRUE ) find_package( Threads )