blob: 0aaea3a148f2e14e63c92017f3304016295b0057 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
if(WIN32)
set(MOZJS_INCLUDE_DIR "MOZJS_INCLUDE_DIR-NOTFOUND" CACHE PATH "Path to the MOZJS include directory")
set(MOZJS_LIBRARIES "MOZJS_LIBRARIES-NOTFOUND" CACHE FILEPATH "Path to the MOZJS .lib file")
if(MOZJS_LIBRARIES AND MOZJS_INCLUDE_DIR)
set(MOZJS_FOUND 1)
link_directories(MOZJS_LIBRARIES)
include_directories("${MOZJS_INCLUDE_DIR}")
endif()
elseif(NOT APPLE)
set(MOZJS_SEARCH_ORDER "mozilla-js;xulrunner-js;firefox-js;seamonkey-js" CACHE STRING "MozJS search order")
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
foreach(MOZJSLIB ${MOZJS_SEARCH_ORDER})
pkg_search_module(MOZJS ${MOZJSLIB})
if(MOZJS_FOUND)
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})
pkg_search_module(MOZJS2 ${MOZJSLIB}>=2.0b12)
if(MOZJS2_FOUND)
add_definitions(-DHAVE_MOZJS_2)
endif(MOZJS2_FOUND)
break()
else()
set(MOZJS_FOUND 0)
endif()
endforeach()
else()
set(MOZJS_FOUND 0)
endif()
endif()
|