Browse files

CMake Changes

Change-Id: I94677cb326c1fa8bac271e5ae275e3756bb6b07c
  • Loading branch information...
1 parent 9df7c4f commit a5a4cc002b9cc3e7df215443c8e4353f66ec2e33 @sarumugam sarumugam committed Aug 29, 2012
Showing with 27 additions and 4 deletions.
  1. +27 −4 CMakeLists.txt
View
31 CMakeLists.txt
@@ -44,16 +44,39 @@ pkg_check_modules(CJSON cjson)
include_directories(${CJSON_INCLUDE_DIRS})
webos_add_compiler_flags(ALL ${CJSON_CFLAGS})
-pkg_check_modules(MOJODB mojodb)
-include_directories(${MOJODB_INCLUDE_DIRS})
-webos_add_compiler_flags(ALL ${MOJODB_CFLAGS})
+#pkg_check_modules(MOJODB mojodb)
+#include_directories(${MOJODB_INCLUDE_DIRS})
+#webos_add_compiler_flags(ALL ${MOJODB_CFLAGS})
+
+find_library(MJCORE NAMES mojocore libmojocore)
+if(MJCORE STREQUAL "MJCORE-NOTFOUND")
+ message(FATAL_ERROR "Failed to find libmojocore. Please install openwebos/db8")
+endif()
+
+find_library(MJLUNA NAMES mojoluna libmojoluna)
+if(MJLUNA STREQUAL "MJLUNA-NOTFOUND")
+ message(FATAL_ERROR "Failed to find libmojoluna. Please install openwebos/db8")
+endif()
+
+find_library(MJDB NAMES mojodb libmojodb)
+if(MJDB STREQUAL "MJDB-NOTFOUND")
+ message(FATAL_ERROR "Failed to find mojodb. Please install openwebos/db8")
+endif()
+
+find_path(MJ_INC NAMES mojodb/core/MojErr.h)
+if(MJ_INC STREQUAL "MJ_INC-NOTFOUND")
+ message(FATAL_ERROR "Failed to find mojodb header. Please install openwebos/db8")
+endif()
+include_directories(${MJ_INC}/mojodb)
file(GLOB SOURCE_FILES src/*.cpp)
add_executable(configurator ${SOURCE_FILES} )
target_link_libraries(configurator
-L.
- ${MOJODB_LDFLAGS}
+ ${MJDB}
+ ${MJCORE}
+ ${MJLUNA}
${GLIB2_LDFLAGS}
${LUNASERVICE_LDFLAGS}
${CJSON_LDFLAGS}

0 comments on commit a5a4cc0

Please sign in to comment.