```cmake
include(ExternalProject)

FIND_PACKAGE(Boost)
if(Boost-NOTFOUND)
  include(BoostMinimal)
endif()

if(ENABLE_TESTS)
	include(GTest-1.6)
endif()

include(Redis)

include(JavaScriptCore)
include(JSObjects)

include(SwigJS)
include(RedisDocStore)
```

Declare a project dependency to force correct build order of externals.
user
```cmake
include(ExternalProject)

FIND_PACKAGE(Boost)
if(Boost-NOTFOUND)
  include(BoostMinimal)
endif()

if(ENABLE_TESTS)
	include(GTest-1.6)
endif()

include(Redis)

include(JavaScriptCore)
include(JSObjects)

include(SwigJS)
include(RedisDocStore)
add_dependencies(store_external swig_js)

```
assistant