mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
copy resources to OS X application bundle
This commit is contained in:
parent
8c8309c1f4
commit
dcb0e5add2
2 changed files with 13 additions and 12 deletions
|
@ -23,14 +23,19 @@ configure_file(InterfaceConfig.h.in ${PROJECT_BINARY_DIR}/includes/InterfaceConf
|
||||||
# grab the implementation and header files from src dir
|
# grab the implementation and header files from src dir
|
||||||
file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
|
file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
# set how the icon shows up in the Info.plist file
|
# set how the icon shows up in the Info.plist file
|
||||||
SET(MACOSX_BUNDLE_ICON_FILE interface.icns)
|
SET(MACOSX_BUNDLE_ICON_FILE interface.icns)
|
||||||
# set where in the bundle to put the icns file
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/interface.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
# grab the image and audio files
|
||||||
# include the icns file in the target
|
FILE(GLOB INTERFACE_RES_DIRS resources/*)
|
||||||
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/interface.icns)
|
set(INTERFACE_RSRCS ${INTERFACE_RES_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/interface.icns)
|
||||||
ENDIF(APPLE)
|
|
||||||
|
# set where in the bundle to put the resources file
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(${INTERFACE_RSRCS} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
# include the icns file and resource files in the target
|
||||||
|
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${INTERFACE_RSRCS})
|
||||||
|
endif (APPLE)
|
||||||
|
|
||||||
# create the executable, make it a bundle on OS X
|
# create the executable, make it a bundle on OS X
|
||||||
add_executable(interface MACOSX_BUNDLE ${INTERFACE_SRCS})
|
add_executable(interface MACOSX_BUNDLE ${INTERFACE_SRCS})
|
||||||
|
|
|
@ -184,11 +184,7 @@ double elapsedTime;
|
||||||
|
|
||||||
// Particles
|
// Particles
|
||||||
|
|
||||||
// To add a new texture:
|
char texture_filename[] = "images/int-texture256-v4.png";
|
||||||
// 1. Add to the XCode project in the Resources/images group
|
|
||||||
// (ensure "Copy file" is checked
|
|
||||||
// 2. Add to the "Copy files" build phase in the project
|
|
||||||
char texture_filename[] = "./int-texture256-v4.png";
|
|
||||||
unsigned int texture_width = 256;
|
unsigned int texture_width = 256;
|
||||||
unsigned int texture_height = 256;
|
unsigned int texture_height = 256;
|
||||||
|
|
||||||
|
@ -311,7 +307,7 @@ void initDisplay(void)
|
||||||
glEnable(GL_LIGHT0);
|
glEnable(GL_LIGHT0);
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
//load_png_as_texture(texture_filename);
|
// load_png_as_texture(texture_filename);
|
||||||
|
|
||||||
if (fullscreen) glutFullScreen();
|
if (fullscreen) glutFullScreen();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue