refactoring and moving forward
[src/app-framework-main.git] / src / CMakeLists.txt
index 0512206..499d38a 100644 (file)
@@ -16,6 +16,8 @@
 # limitations under the License.
 ###########################################################################
 
+cmake_minimum_required(VERSION 2.8)
+
 include(FindPkgConfig)
 
 pkg_check_modules(EXTRAS REQUIRED
@@ -39,13 +41,13 @@ include_directories(simulation)
 
 add_compile_options(-Wall -Wno-pointer-sign)
 add_compile_options(-ffunction-sections -fdata-sections)
+add_compile_options(-fPIC)
 add_compile_options(-Wl,--gc-sections)
 
-#SET(CMAKE_C_FLAGS_PROFILING    "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE")
-#SET(CMAKE_C_FLAGS_DEBUG        "-g -O0 -ggdb -Wp,-U_FORTIFY_SOURCE")
-#SET(CMAKE_C_FLAGS_RELEASE      "-g -O2")
-#SET(CMAKE_C_FLAGS_CCOV         "-g -O2 --coverage")
-#ADD_COMPILE_OPTIONS("-fPIC")
+set(CMAKE_C_FLAGS_PROFILING    "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE")
+set(CMAKE_C_FLAGS_DEBUG        "-g -O0 -ggdb -Wp,-U_FORTIFY_SOURCE")
+set(CMAKE_C_FLAGS_RELEASE      "-g -O2")
+set(CMAKE_C_FLAGS_CCOV         "-g -O2 --coverage")
 
 ###########################################################################
 
@@ -78,28 +80,30 @@ add_library(secwrp
        )
 
 add_library(afm
-       af-db.c
-       af-launch.c
-       af-run.c
+       afm-db.c
+       afm-launch.c
+       afm-run.c
        )
 
 add_executable(wgtpkg-sign wgtpkg-sign.c)
 target_link_libraries(wgtpkg-sign wgtpkg utils)
 
-
 add_executable(wgtpkg-pack wgtpkg-pack.c)
 target_link_libraries(wgtpkg-pack wgtpkg utils)
 
-
 add_executable(wgtpkg-info wgtpkg-info.c)
 target_link_libraries(wgtpkg-info wgtpkg wgt utils)
 
-
 add_executable(wgtpkg-installer wgtpkg-installer.c)
 target_link_libraries(wgtpkg-installer wgtpkg wgt secwrp utils)
 
+add_executable(afm-user-daemon afm-user-daemon.c)
+target_link_libraries(afm-user-daemon afm secwrp wgt utils)
 
-add_executable(af-usrd af-usrd.c)
-target_link_libraries(af-usrd afm secwrp wgt utils)
+add_executable(afm-system-daemon afm-system-daemon.c)
+target_link_libraries(afm-system-daemon wgtpkg afm secwrp wgt utils)
 
+install(TARGETS wgtpkg-sign wgtpkg-pack wgtpkg-info wgtpkg-installer DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+install(TARGETS afm-user-daemon DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+install(TARGETS afm-system-daemon DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})