diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ccc4a11..6777185 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -687,26 +687,28 @@ if (APPLE OR IOS) endif() -if (APPLE OR IOS) - OPTION(DISABLE_JSC "Ignore JavaScriptCore" OFF) - if (NOT DISABLE_JSC AND NOT DISABLE_ALL) - find_library(JSC_LIBRARY JavaScriptCore) +OPTION(DISABLE_JSC "Ignore JavaScriptCore" OFF) +if (NOT DISABLE_JSC AND NOT DISABLE_ALL AND NOT V8_FOUND) + find_package(JSC REQUIRED) + if (JSC_FOUND) + if (NOT APPLE) + include_directories(${JSC_INCLUDE_DIR}) + endif() list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) - set(JSC_FOUND ON) - else() - set(JSC_FOUND OFF) endif() else() - OPTION(DISABLE_V8 "Ignore Google's v8" OFF) - if (NOT DISABLE_V8 AND NOT DISABLE_ALL) - find_package(V8) - if (V8_FOUND) - include_directories(${V8_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) - endif() - else() - set(V8_FOUND OFF) + set(JSC_FOUND OFF) +endif() + +OPTION(DISABLE_V8 "Ignore Google's v8" OFF) +if (NOT DISABLE_V8 AND NOT DISABLE_ALL AND NOT JSC_FOUND) + find_package(V8) + if (V8_FOUND) + include_directories(${V8_INCLUDE_DIR}) + list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) endif() +else() + set(V8_FOUND OFF) endif() |