diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c948689..9809bcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -687,10 +687,26 @@ if (APPLE OR IOS) endif() +OPTION(DISABLE_SPIDERMONKEY "Ignore SpiderMonkey" ON) +if (NOT DISABLE_SPIDERMONKEY AND NOT DISABLE_ALL AND NOT ECMA_FOUND) + find_package(SpiderMonkey) + if (SPIDERMONKEY_FOUND) + set(ECMA_FOUND ON) + include_directories(${SPIDERMONKEY_INCLUDE_DIR}) + if (UNIX) + add_definitions(-DXP_UNIX) + endif() + list (APPEND USCXML_OPT_LIBS ${SPIDERMONKEY_LIBRARY}) + endif() +else() + set(SPIDERMONKEY_FOUND OFF) +endif() + OPTION(DISABLE_JSC "Ignore JavaScriptCore" OFF) -if (NOT DISABLE_JSC AND NOT DISABLE_ALL AND NOT V8_FOUND) +if (NOT DISABLE_JSC AND NOT DISABLE_ALL AND NOT ECMA_FOUND) find_package(JSC) if (JSC_FOUND) + set(ECMA_FOUND ON) if (NOT APPLE) include_directories(${JSC_INCLUDE_DIR}) endif() @@ -701,9 +717,10 @@ else() endif() OPTION(DISABLE_V8 "Ignore Google's v8" OFF) -if (NOT DISABLE_V8 AND NOT DISABLE_ALL AND NOT JSC_FOUND) +if (NOT DISABLE_V8 AND NOT DISABLE_ALL AND NOT ECMA_FOUND) find_package(V8) if (V8_FOUND) + set(ECMA_FOUND ON) include_directories(${V8_INCLUDE_DIR}) list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) endif() |