2017-02-11 01:16:26 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project(dust3d)
|
|
|
|
|
2017-02-12 09:59:51 +00:00
|
|
|
file(GLOB_RECURSE SOURCES
|
2017-02-11 01:16:26 +00:00
|
|
|
src/glw_osx.m
|
|
|
|
src/glw_internal.h
|
|
|
|
src/glw_style.h
|
|
|
|
src/glw.c
|
|
|
|
src/glw.h
|
|
|
|
src/dmemory.h
|
|
|
|
src/dmemory.c
|
|
|
|
src/3dstruct.h
|
|
|
|
src/array.h
|
|
|
|
src/array.c
|
|
|
|
src/dict.h
|
|
|
|
src/dict.c
|
|
|
|
src/bmesh.h
|
|
|
|
src/bmesh.c
|
|
|
|
src/matrix.h
|
|
|
|
src/matrix.c
|
|
|
|
src/subdivide.h
|
|
|
|
src/subdivide.c
|
|
|
|
src/vector3d.h
|
|
|
|
src/vector3d.c
|
|
|
|
src/convexhull.h
|
|
|
|
src/convexhull.c
|
|
|
|
src/draw.h
|
|
|
|
src/draw.c
|
2017-02-11 09:16:58 +00:00
|
|
|
src/skeleton.h
|
|
|
|
src/skeleton.c
|
2017-02-12 09:59:51 +00:00
|
|
|
src/icons.h
|
|
|
|
src/icons.c
|
2017-02-11 01:16:26 +00:00
|
|
|
src/editor.c
|
2017-02-12 09:59:51 +00:00
|
|
|
src/lodepng.h
|
|
|
|
src/lodepng.c
|
2017-02-11 01:16:26 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
IF(APPLE)
|
2017-02-12 09:59:51 +00:00
|
|
|
file(GLOB_RECURSE RES_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/res/*.png")
|
|
|
|
add_executable(dust3d MACOSX_BUNDLE ${SOURCES} ${RES_SOURCES})
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(${RES_SOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
2017-02-11 01:16:26 +00:00
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
include_directories(${OPENGL_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(dust3d ${OPENGL_LIBRARIES})
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit -framework Quartz")
|
2017-02-12 09:59:51 +00:00
|
|
|
set_target_properties(dust3d PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/src/Info.plist)
|
|
|
|
install(TARGETS dust3d DESTINATION ".")
|
2017-02-11 01:16:26 +00:00
|
|
|
ENDIF (APPLE)
|