Allow dynamic linking of framework to application
[oonf.git] / src / CMakeLists.txt
index c7be987..27271be 100644 (file)
@@ -1,5 +1,8 @@
 # build framework
-include(CMake.build)
+add_subdirectory(common)
+add_subdirectory(config)
+add_subdirectory(builddata)
+add_subdirectory(core)
 
 # add main program
 set(OONF_SRCS ${OONF_SRCS} olsr_main.c olsr_setup.c)
@@ -7,5 +10,9 @@ set(OONF_SRCS ${OONF_SRCS} olsr_main.c olsr_setup.c)
 # create executable
 ADD_EXECUTABLE(${OONF_EXE} ${OONF_SRCS})
 
-# link framework libraries
-include(CMake.link)
+# link framework libraries (choose one)
+IF (OONF_FRAMEWORD_DYNAMIC)
+    include(CMake.link_dynamic)
+ELSE (OONF_FRAMEWORD_DYNAMIC)
+    include(CMake.link_static)
+endif(OONF_FRAMEWORD_DYNAMIC)