Commit 11e860a5497c6e5e7f8baaeb849f8736ef745471

Authored by Josh Klontz
1 parent cabf9545

simplified resource logic

CMakeLists.txt
@@ -39,6 +39,8 @@ if(APPLE) @@ -39,6 +39,8 @@ if(APPLE)
39 set(BR_APPLE_RESOURCES ${NATIVE_ICON}) 39 set(BR_APPLE_RESOURCES ${NATIVE_ICON})
40 endif() 40 endif()
41 41
  42 +set(BR_RESOURCES ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES})
  43 +
42 if(UNIX) 44 if(UNIX)
43 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fvisibility=hidden -fno-omit-frame-pointer") 45 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fvisibility=hidden -fno-omit-frame-pointer")
44 endif() 46 endif()
app/br-creator/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT ${BR_EMBEDDED}) @@ -3,7 +3,7 @@ if(NOT ${BR_EMBEDDED})
3 aux_source_directory(. SRC) 3 aux_source_directory(. SRC)
4 4
5 # Build executable 5 # Build executable
6 - add_executable(br-creator WIN32 ${SRC} ${MOC} ${UIC} ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES}) 6 + add_executable(br-creator WIN32 ${SRC} ${MOC} ${UIC} ${BR_RESOURCES})
7 set_target_properties(br-creator PROPERTIES AUTOMOC TRUE) 7 set_target_properties(br-creator PROPERTIES AUTOMOC TRUE)
8 target_link_libraries(br-creator openbr openbr-gui ${QT_LIBRARIES}) 8 target_link_libraries(br-creator openbr openbr-gui ${QT_LIBRARIES})
9 9
app/br/CMakeLists.txt
@@ -2,6 +2,6 @@ if(UNIX) @@ -2,6 +2,6 @@ if(UNIX)
2 find_package(Threads REQUIRED) 2 find_package(Threads REQUIRED)
3 endif() 3 endif()
4 4
5 -add_executable(br br.cpp) 5 +add_executable(br br.cpp ${BR_RESOURCES})
6 target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) 6 target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT})
7 install(TARGETS br RUNTIME DESTINATION bin) 7 install(TARGETS br RUNTIME DESTINATION bin)
app/forensicface/CMakeLists.txt
@@ -7,7 +7,7 @@ qt4_wrap_cpp(MOC mainwindow.h) @@ -7,7 +7,7 @@ qt4_wrap_cpp(MOC mainwindow.h)
7 qt4_wrap_ui(UIC mainwindow.ui) 7 qt4_wrap_ui(UIC mainwindow.ui)
8 8
9 # Build executable 9 # Build executable
10 -add_executable(forensicface WIN32 ${SRC} ${MOC} ${UIC} ${BR_WINDOWS_RESOURCES} ${BR_APPLE_RESOURCES}) 10 +add_executable(forensicface WIN32 ${SRC} ${MOC} ${UIC} ${BR_RESOURCES})
11 target_link_libraries(forensicface openbr openbr-gui ${QT_LIBRARIES}) 11 target_link_libraries(forensicface openbr openbr-gui ${QT_LIBRARIES})
12 12
13 # Install 13 # Install
app/openbr-gui/CMakeLists.txt
@@ -6,7 +6,7 @@ if(NOT ${BR_EMBEDDED}) @@ -6,7 +6,7 @@ if(NOT ${BR_EMBEDDED})
6 file(GLOB HEADERS *.h) 6 file(GLOB HEADERS *.h)
7 qt4_add_resources(ICONS icons/icons.qrc) # Don't forget to modify initialize.cpp 7 qt4_add_resources(ICONS icons/icons.qrc) # Don't forget to modify initialize.cpp
8 8
9 - add_library(openbr-gui SHARED ${SRC} ${QWT_SRC} ${ICONS} ${BR_WINDOWS_RESOURCES}) 9 + add_library(openbr-gui SHARED ${SRC} ${QWT_SRC} ${ICONS} ${BR_RESOURCES})
10 set_target_properties(openbr-gui PROPERTIES 10 set_target_properties(openbr-gui PROPERTIES
11 DEFINE_SYMBOL BR_LIBRARY_GUI 11 DEFINE_SYMBOL BR_LIBRARY_GUI
12 VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} 12 VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
sdk/CMakeLists.txt
@@ -9,7 +9,7 @@ aux_source_directory(. SRC) @@ -9,7 +9,7 @@ aux_source_directory(. SRC)
9 aux_source_directory(core BR_CORE) 9 aux_source_directory(core BR_CORE)
10 include(plugins/plugins.cmake) 10 include(plugins/plugins.cmake)
11 11
12 -add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_PLUGIN} ${BR_THIRDPARTY_SRC} ${BR_WINDOWS_RESOURCES}) 12 +add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_PLUGIN} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES})
13 set_target_properties(openbr PROPERTIES 13 set_target_properties(openbr PROPERTIES
14 DEFINE_SYMBOL BR_LIBRARY 14 DEFINE_SYMBOL BR_LIBRARY
15 VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} 15 VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}