From 659316e4f491b62868a6706fb35d097f51711c67 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Tue, 22 Jan 2008 05:34:53 +0000 Subject: Fixes for CMake. --- CMakeLists.txt | 9 +++++---- extern/CMakeLists.txt | 4 ++-- extern/binreloc/CMakeLists.txt | 2 +- source/blender/blenlib/CMakeLists.txt | 7 +++++++ source/creator/CMakeLists.txt | 13 ++++++++++--- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16818b4a846..1804eb54446 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,6 @@ OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" OFF) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF) -OPTION(WITH_BINRELOC "Enable binreloc filepath support" OFF) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") @@ -257,9 +256,6 @@ IF(WIN32) SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49) SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - SET(BINRELC ${LIBDIR}/binreloc) - SET(BINRELC_INC ${BINRELOC}/include) - SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm) IF(WITH_OPENAL) SET(LLIBS ${LLIBS} dxguid) @@ -370,6 +366,11 @@ IF(APPLE) SET(EXETYPE MACOSX_BUNDLE) ENDIF(APPLE) +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc) + SET(BINRELOC_INC ${BINRELOC}/include) +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + #----------------------------------------------------------------------------- # Common. SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 1842aa05246..db2584d012e 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -43,6 +43,6 @@ IF(WITH_VERSE) SUBDIRS(verse) ENDIF(WITH_VERSE) -if(WITH_BINRELOC) +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SUBDIRS(binreloc) -ENDIF(WITH_BINRELOC) +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") diff --git a/extern/binreloc/CMakeLists.txt b/extern/binreloc/CMakeLists.txt index ee4dccf4cda..78dc65d8112 100644 --- a/extern/binreloc/CMakeLists.txt +++ b/extern/binreloc/CMakeLists.txt @@ -22,5 +22,5 @@ SET(INC ./include ${WINTAB_INC}) ADD_DEFINITIONS(-DWITH_BINRELOC) FILE(GLOB SRC *.c) -BLENDERLIB(binreloc "${SRC}" "${INC}") +BLENDERLIB(extern_binreloc "${SRC}" "${INC}") #, libtype=['core','player'], priority = [25,15] ) diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 4812cad033d..ac2f3235646 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -36,6 +36,13 @@ SET(INC ${ZLIB_INC} ) +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") +SET(INC + ${INC} + ${BINRELOC_INC} +) +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + IF(WITH_VERSE) ADD_DEFINITIONS(-DWITH_VERSE) SET(INC ${INC} ${VERSE_INC}) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 4f11ea672d3..2b566d77a29 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -42,16 +42,18 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc ../blender/makesdna ../kernel/gen_messaging ../kernel/gen_system - ../../extern/binreloc/include ) + + IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) -IF(WITH_BINRELOC) +IF(LINUX) ADD_DEFINITIONS(-DWITH_BINRELOC) -endif(WITH_BINRELOC) + INCLUDE_DIRECTORIES(${BINRELOC_INC}) +endif(LINUX) IF(YESIAMSTUPID) ADD_DEFINITIONS(-DYESIAMSTUPID) @@ -196,6 +198,10 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity blender_IK bf_elbeem) +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + IF(UNIX) # Sort libraries SET(BLENDER_SORTED_LIBS @@ -259,6 +265,7 @@ IF(UNIX) bf_moto blender_python bf_quicktime + extern_binreloc ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) -- cgit v1.2.3