mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 00:07:31 +02:00
Merge pull request #388 from birarda/master
DRY up the resource copying
This commit is contained in:
commit
f3855e54f9
1 changed files with 11 additions and 6 deletions
|
@ -48,14 +48,19 @@ if (APPLE)
|
||||||
# set where in the bundle to put the resources file
|
# set where in the bundle to put the resources file
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/interface.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/interface.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
|
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/interface.icns)
|
||||||
|
|
||||||
# grab the directories in resources and put them in the right spot in Resources
|
# grab the directories in resources and put them in the right spot in Resources
|
||||||
FILE(GLOB INTERFACE_IMAGES resources/images/*)
|
file(GLOB RESOURCE_SUBDIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/resources ${CMAKE_CURRENT_SOURCE_DIR}/resources/*)
|
||||||
SET_SOURCE_FILES_PROPERTIES(${INTERFACE_IMAGES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/images)
|
foreach(DIR ${RESOURCE_SUBDIRS})
|
||||||
|
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/${DIR})
|
||||||
|
FILE(GLOB DIR_CONTENTS resources/${DIR}/*)
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(${DIR_CONTENTS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/${DIR})
|
||||||
|
|
||||||
|
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${DIR_CONTENTS})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
FILE(GLOB INTERFACE_SHADERS resources/shaders/*)
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(${INTERFACE_SHADERS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/shaders)
|
|
||||||
|
|
||||||
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${INTERFACE_IMAGES} ${INTERFACE_SHADERS} ${CMAKE_CURRENT_SOURCE_DIR}/interface.icns)
|
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED QtCore QtGui QtOpenGL)
|
find_package(Qt4 REQUIRED QtCore QtGui QtOpenGL)
|
||||||
|
|
Loading…
Reference in a new issue