summaryrefslogtreecommitdiff
path: root/LayerManagerClient
diff options
context:
space:
mode:
Diffstat (limited to 'LayerManagerClient')
-rw-r--r--LayerManagerClient/ilmClient/CMakeLists.txt49
-rw-r--r--LayerManagerClient/ilmClient/makefile66
2 files changed, 49 insertions, 66 deletions
diff --git a/LayerManagerClient/ilmClient/CMakeLists.txt b/LayerManagerClient/ilmClient/CMakeLists.txt
new file mode 100644
index 0000000..fd9b717
--- /dev/null
+++ b/LayerManagerClient/ilmClient/CMakeLists.txt
@@ -0,0 +1,49 @@
+############################################################################
+#
+# Copyright 2010, 2011 BMW Car IT GmbH
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+cmake_minimum_required (VERSION 2.6)
+
+include_directories ("include")
+
+add_library(ilmClient SHARED src/ilm_client_priv.c src/ilm_client.c)
+
+find_package(DBUS REQUIRED)
+include_directories(${DBUS_INCLUDE_DIR})
+include_directories(${DBUS_ARCH_INCLUDE_DIR})
+
+set(LIBS ${LIBS} ${DBUS_LIBRARY})
+target_link_libraries(ilmClient ${LIBS})
+
+install (TARGETS ilmClient LIBRARY DESTINATION lib)
+install (FILES include/ilm_client.h include/ilm_types.h include/ilm_client_platform.h DESTINATION include/ilm)
+
+
+
+
+if (WITH_TESTS)
+enable_testing()
+
+include_directories(tests)
+
+add_executable(ilmClient_Test tests/IlmCommandTest.cpp tests/gtest/gtest_main.cc tests/gtest/gtest-all.cc )
+target_link_libraries(ilmClient_Test ilmClient ${LIBS} ${DBUS_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+
+add_test(AllTestsInTest ilmClient_Test)
+
+endif(WITH_TESTS) \ No newline at end of file
diff --git a/LayerManagerClient/ilmClient/makefile b/LayerManagerClient/ilmClient/makefile
deleted file mode 100644
index b1de033..0000000
--- a/LayerManagerClient/ilmClient/makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-############################################################################
-#
-# Copyright 2010 BMW Car IT GmbH
-#
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-############################################################################
-
-
-
-ifneq ($(CONFIG),)
-include ../../LayerManagerPlatform/Make$(CONFIG).defs
-endif
-
-SRC += ilm_client.c ilm_client_priv.c
-
-TARGET_NAME = libilm_client.so
-
-ADD_INCLUDE_DIR+=include \
- $(PREFIX)/usr/lib/dbus-1.0/include \
- $(PREFIX)/usr/local/lib/dbus-1.0/include \
- $(PREFIX)/usr/local/include/dbus-1.0 \
-
-
-ADD_LIB_DIR+= $(PREFIX)/lib \
- $(PREFIX)/usr/lib
-ADD_LIBS+= dbus-1
-
-OBJS += $(patsubst %.c,build/%.o,$(SRC))
-TARGET = build/$(TARGET_NAME)
-INCLUDE= $(patsubst %$,-I%,$(ADD_INCLUDE_DIR))
-LIBS+=$(shell pkg-config --libs $(PKG)) $(patsubst %$,-L%,$(ADD_LIB_DIR)) $(patsubst %$,-l%,$(ADD_LIBS))
-
-all: $(TARGET)
-
-build/%.o: src/%.c
- $(shell mkdir -p $(shell dirname $@))
- $(CC) $(CPPFLAGS) $(INCLUDE) -c -o $@ $<
-
-$(TARGET): $(OBJS)
- $(CXX) $(CXXFLAGS) -shared -W1,-soname,$(TARGET) -o $(TARGET) $(OBJS) $(LIBS)
-
-
-install:
- mkdir -p $(PREFIX)/usr/lib
- install -m 755 $(TARGET) $(PREFIX)/usr/lib
- mkdir -p $(PREFIX)/usr/include/layermanager/
- install -m 755 include/ilm_client.h $(PREFIX)/usr/include/layermanager/
- install -m 755 include/ilm_types.h $(PREFIX)/usr/include/layermanager/
- install -m 755 include/ilm_client_platform.h $(PREFIX)/usr/include/layermanager/
- install -m 755 ../../LayerManagerExamples/LayerSceneDescriptionExample/include/LayerScene.h $(PREFIX)/usr/include/layermanager/
-
-clean:
- rm -f $(OBJS) $(TARGET)
- rm -rf build