Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix to work with macosx (cmake -g "Unix Makefiles")

  • Loading branch information...
commit 8a51849db5906c9c1508032a70e7e72d4a1444ca 1 parent 1df30ef
@edy555 edy555 authored
View
8 Modules/CMakeASM_YASMInformation.cmake
@@ -1,7 +1,13 @@
set(ASM_DIALECT "_YASM")
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
-if(UNIX)
+if(APPLE)
+ if(BITS EQUAL 64)
+ set(CMAKE_ASM_YASM_COMPILER_ARG1 "-f macho64 -DARCH_X86_64 -DPREFIX")
+ else()
+ set(CMAKE_ASM_YASM_COMPILER_ARG1 "-f macho32 -DPREFIX")
+ endif()
+elseif(UNIX)
if(BITS EQUAL 64)
set(CMAKE_ASM_YASM_COMPILER_ARG1 "-f elf64 -DARCH_X86_64")
else()
View
4 examples/27c3_slides/CMakeLists.txt
@@ -30,6 +30,10 @@ if(CURSES_FOUND AND FFMPEG_FOUND)
target_link_libraries(slides openlase ${FFMPEG_LIBRARIES} ${CURSES_LIBRARIES})
+ if(APPLE)
+ target_link_libraries(slides "-framework CoreFoundation" "-framework VideoDecodeAcceleration" "-framework QuartzCore" bz2 z)
+ endif(APPLE)
+
function(svg2ild NAME)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.ild
DEPENDS ${CMAKE_SOURCE_DIR}/tools/svg2ild.py
View
2  examples/CMakeLists.txt
@@ -28,8 +28,10 @@ target_link_libraries(scope ${JACK_LIBRARIES} m)
add_executable(simple simple.c)
target_link_libraries(simple openlase)
+if(NOT APPLE)
add_executable(pong pong.c)
target_link_libraries(pong openlase)
+endif()
if(ALSA_FOUND)
add_executable(midiview midiview.c)
View
1  libol/CMakeLists.txt
@@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+include (CheckFunctionExists)
check_include_files(malloc.h HAVE_MALLOC_H)
check_function_exists(memalign HAVE_MEMALIGN)
View
2  libol/trace.c
@@ -22,7 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include "trace.h"
#include "align.h"
View
6 tools/CMakeLists.txt
@@ -25,7 +25,11 @@ target_link_libraries(playilda ${JACK_LIBRARIES})
if(FFMPEG_FOUND)
include_directories(${FFMPEG_INCLUDE_DIR})
add_executable(playvid playvid.c)
- target_link_libraries(playvid openlase ${FFMPEG_LIBRARIES})
+ target_link_libraries(playvid openlase ${FFMPEG_LIBRARIES})
+
+ if(APPLE)
+ target_link_libraries(playvid "-framework CoreFoundation" "-framework VideoDecodeAcceleration" "-framework QuartzCore" bz2 z)
+ endif(APPLE)
else()
message(STATUS "Will NOT build playvid (FFmpeg missing)")
endif()
View
1  tools/playvid.c
@@ -158,7 +158,6 @@ int av_vid_init(char *file)
return -1;
dump_format(pFormatCtx, 0, file, 0);
-
videoStream=-1;
for (i=0; i<pFormatCtx->nb_streams; i++) {
if (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
View
6 tools/simulator.c
@@ -25,9 +25,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <math.h>
#include <jack/jack.h>
+#ifdef __APPLE__
+#include <GLUT/glut.h>
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#else
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
+#endif
int window;
Please sign in to comment.
Something went wrong with that request. Please try again.