Skip to content
Browse files

Merge pull request #2 from robklpd/master

No more manual commenting out for ubuntu
  • Loading branch information...
2 parents c677e35 + 8b67804 commit 2eaecdc4379266031c9a533bcd90440f245e84ec @pibara committed
Showing with 7 additions and 4 deletions.
  1. +7 −4 CMakeLists.txt
View
11 CMakeLists.txt
@@ -7,10 +7,13 @@ set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
ADD_DEFINITIONS( -Wall -Werror -Weffc++ -Wctor-dtor-privacy -Wuninitialized -Winit-self -Wmissing-include-dirs -Wfloat-equal -Wshadow -Wpointer-arith )
ADD_DEFINITIONS(-DUSE_GOBJECT_JSON_LIB)
-#Uncomment the following line for ubuntu 11.10, FIXME: use cmake properly to figure this out.
-#ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
-#Uncomment the following line for ubuntu 10.04 LTS.
-ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include )
+ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/)
+IF(EXISTS "/usr/include/json-glib-1.0/")
+ ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/)
+ENDIF()
+IF(EXISTS "/usr/lib/x86_64-linux-gnu/glib-2.0/include/")
+ ADD_DEFINITIONS( -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
+ENDIF()
add_library(jsonme SHARED JsonMeLib.cpp Scalar.cpp Node.cpp ParseError.cpp gobj/GobjectLibImpl.cpp gobj/GobjectImplParser.cpp gobj/GobjectImplFsTopNode.cpp gobj/GobjectImplStringTopNode.cpp gobj/GobjectImplError.cpp gobj/GobjectImplNode.cpp gobj/GobjectImplScalar.cpp gobj/GobjectImplKeys.cpp)
SET_TARGET_PROPERTIES(jsonme PROPERTIES VERSION 1.0.0 SOVERSION 1)
target_link_libraries(jsonme gobject-2.0 json-glib-1.0)

0 comments on commit 2eaecdc

Please sign in to comment.
Something went wrong with that request. Please try again.