Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
BSD patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Alon Zakai committed Jan 28, 2010
1 parent f1fe060 commit a5f4791
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -10,11 +10,11 @@
cmake_minimum_required(VERSION 2.6)
project(Intensity)

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
message(STATUS "...Linux...")
add_definitions (-DLINUX)
set(CMAKE_CXX_FLAGS "-g -O1 -Wall -Werror")
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message(STATUS "...OS X...")
Expand Down Expand Up @@ -43,7 +43,7 @@ else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message(STATUS "Set up SDKs at: ${PLATFORM_SDK_A};${PLATFORM_SDK_B}")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")

add_subdirectory(src)

7 changes: 7 additions & 0 deletions COMPILE.txt
Expand Up @@ -300,3 +300,10 @@ Some things to be aware of:

The relevant file is windows_runtime.zip.


FreeBSD
=======

Compiling on FreeBSD should work by following the instructions for Linux
as written above.

11 changes: 7 additions & 4 deletions src/client/CMakeLists.txt
Expand Up @@ -2,9 +2,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions (-fsigned-char)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

include_directories(../thirdparty/v8/include)
link_directories(../../../src/thirdparty/v8)
link_directories(../../src/thirdparty/v8)
include_directories(${CMAKE_SOURCE_DIR}/src/thirdparty/v8/include)
link_directories(${CMAKE_SOURCE_DIR}/src/thirdparty/v8)

#add_definitions(-DUSE_JPEG2000)

Expand All @@ -13,6 +12,10 @@ add_executable(Intensity_CClient ../engine/3dgui ../engine/blob ../engine/blend
target_link_libraries(Intensity_CClient enet v8 ${PYTHON_LIBRARIES} ${Boost_Python_Library} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLSOUND_LIBRARY} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES})

if(${WIN32})
target_link_libraries(opengl32 glu32 ws2_32 winmm msvcrt user32 imagehlp)
target_link_libraries(opengl32 glu32 ws2_32 winmm msvcrt user32 imagehlp) # Intensity_CClient?
endif(${WIN32})

if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
target_link_libraries(Intensity_CClient execinfo)
endif(${CMAKE_SYSTEM_NAME} MATCHES "BSD")

8 changes: 6 additions & 2 deletions src/python/intensity/base.py
Expand Up @@ -32,10 +32,14 @@
## Base module - foundational stuff

WINDOWS = sys.platform.find("win32") != -1 or sys.platform.find("win64") != -1 # ??? FIXME

LINUX = sys.platform.find("linux") != -1
OSX = sys.platform.find("darwin") != -1
BSD = sys.platform.find("bsd") != -1

UNIX = LINUX or OSX or BSD

assert(WINDOWS or LINUX or OSX)
assert(WINDOWS or UNIX)

#
# Version
Expand Down Expand Up @@ -102,7 +106,7 @@ def get_home_subdir():

# Use default value if none given to us
if HOME_SUBDIR is None:
if LINUX or OSX:
if UNIX:
HOME_SUBDIR = os.path.join( os.path.expanduser('~'), '.intensityengine_'+suffix )
elif WINDOWS:
HOME_SUBDIR = os.path.join( os.path.expanduser('~'), 'intensityengine_'+suffix )
Expand Down
9 changes: 6 additions & 3 deletions src/server/CMakeLists.txt
Expand Up @@ -2,9 +2,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions (-fsigned-char)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

include_directories(../thirdparty/v8/include)
link_directories(../../../src/thirdparty/v8)
link_directories(../../src/thirdparty/v8)
include_directories(${CMAKE_SOURCE_DIR}/src/thirdparty/v8/include)
link_directories(${CMAKE_SOURCE_DIR}/src/thirdparty/v8)

#add_definitions(-DUSE_JPEG2000)

Expand All @@ -16,3 +15,7 @@ if(${WIN32})
target_link_libraries(ws2_32 winmm msvcrt opengl32)
endif(${WIN32})

if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
target_link_libraries(Intensity_CServer execinfo)
endif(${CMAKE_SYSTEM_NAME} MATCHES "BSD")

0 comments on commit a5f4791

Please sign in to comment.