diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-14 08:11:54 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-14 08:11:54 (GMT) |
commit | 8684cefe080ab61d11d956d17ecfa417c2446dcc (patch) | |
tree | e8f53f52b8098d96d878d0a7f3b07b9b0ba094f3 /CMakeLists.txt | |
parent | 66b0852b0618cc4bfff08d47aa0af56353226190 (diff) | |
download | uscxml-8684cefe080ab61d11d956d17ecfa417c2446dcc.zip uscxml-8684cefe080ab61d11d956d17ecfa417c2446dcc.tar.gz uscxml-8684cefe080ab61d11d956d17ecfa417c2446dcc.tar.bz2 |
JavaScriptCore in CMake module
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() |