From 11e860a5497c6e5e7f8baaeb849f8736ef745471 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 8 Feb 2013 10:59:30 -0500 Subject: [PATCH] simplified resource logic --- CMakeLists.txt | 2 ++ app/br-creator/CMakeLists.txt | 2 +- app/br/CMakeLists.txt | 2 +- app/forensicface/CMakeLists.txt | 2 +- app/openbr-gui/CMakeLists.txt | 2 +- sdk/CMakeLists.txt | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18d13fd..1569271 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,8 @@ if(APPLE) set(BR_APPLE_RESOURCES ${NATIVE_ICON}) endif() +set(BR_RESOURCES ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES}) + if(UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fvisibility=hidden -fno-omit-frame-pointer") endif() diff --git a/app/br-creator/CMakeLists.txt b/app/br-creator/CMakeLists.txt index 8a3b425..941e968 100644 --- a/app/br-creator/CMakeLists.txt +++ b/app/br-creator/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT ${BR_EMBEDDED}) aux_source_directory(. SRC) # Build executable - add_executable(br-creator WIN32 ${SRC} ${MOC} ${UIC} ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES}) + add_executable(br-creator WIN32 ${SRC} ${MOC} ${UIC} ${BR_RESOURCES}) set_target_properties(br-creator PROPERTIES AUTOMOC TRUE) target_link_libraries(br-creator openbr openbr-gui ${QT_LIBRARIES}) diff --git a/app/br/CMakeLists.txt b/app/br/CMakeLists.txt index dc25cd4..7788e24 100644 --- a/app/br/CMakeLists.txt +++ b/app/br/CMakeLists.txt @@ -2,6 +2,6 @@ if(UNIX) find_package(Threads REQUIRED) endif() -add_executable(br br.cpp) +add_executable(br br.cpp ${BR_RESOURCES}) target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS br RUNTIME DESTINATION bin) diff --git a/app/forensicface/CMakeLists.txt b/app/forensicface/CMakeLists.txt index b5d7633..1366967 100644 --- a/app/forensicface/CMakeLists.txt +++ b/app/forensicface/CMakeLists.txt @@ -7,7 +7,7 @@ qt4_wrap_cpp(MOC mainwindow.h) qt4_wrap_ui(UIC mainwindow.ui) # Build executable -add_executable(forensicface WIN32 ${SRC} ${MOC} ${UIC} ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES}) +add_executable(forensicface WIN32 ${SRC} ${MOC} ${UIC} ${BR_RESOURCES}) target_link_libraries(forensicface openbr openbr-gui ${QT_LIBRARIES}) # Install diff --git a/app/openbr-gui/CMakeLists.txt b/app/openbr-gui/CMakeLists.txt index 4b083aa..0207dcf 100644 --- a/app/openbr-gui/CMakeLists.txt +++ b/app/openbr-gui/CMakeLists.txt @@ -6,7 +6,7 @@ if(NOT ${BR_EMBEDDED}) file(GLOB HEADERS *.h) qt4_add_resources(ICONS icons/icons.qrc) # Don't forget to modify initialize.cpp - add_library(openbr-gui SHARED ${SRC} ${QWT_SRC} ${ICONS} ${BR_WINDOWS_RESOURCES}) + add_library(openbr-gui SHARED ${SRC} ${QWT_SRC} ${ICONS} ${BR_RESOURCES}) set_target_properties(openbr-gui PROPERTIES DEFINE_SYMBOL BR_LIBRARY_GUI VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt index 3d0751f..337236b 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -9,7 +9,7 @@ aux_source_directory(. SRC) aux_source_directory(core BR_CORE) include(plugins/plugins.cmake) -add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_PLUGIN} ${BR_THIRDPARTY_SRC} ${BR_WINDOWS_RESOURCES}) +add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_PLUGIN} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES}) set_target_properties(openbr PROPERTIES DEFINE_SYMBOL BR_LIBRARY VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} -- libgit2 0.21.4