Permalink
Browse files

Fixed build for some BSDs and gmake

  • Loading branch information...
1 parent 95064d3 commit 4e1995bcc5952fb2cece247eadc97006b8fec46f @cipherCOM committed Feb 8, 2011
Showing with 24 additions and 8 deletions.
  1. +8 −2 dep/ACE_wrappers/CMakeLists.txt
  2. +10 −3 dep/tbb/CMakeLists.txt
  3. +6 −3 src/game/CMakeLists.txt
@@ -56,14 +56,20 @@ if(WIN32 AND MSVC)
ALWAYS 0
)
elseif(UNIX)
+ if(${CMAKE_BUILD_TOOL} STREQUAL gmake)
+ set(ACE_BUILD_TOOL gmake)
+ else()
+ set(ACE_BUILD_TOOL make)
+ endif()
+
ExternalProject_Add(ACE_Project
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-ssl
- BUILD_COMMAND make -j2 # export arch="ia32" &&
- INSTALL_COMMAND make install
+ BUILD_COMMAND ${ACE_BUILD_TOOL} -j2 # export arch="ia32" &&
+ INSTALL_COMMAND ${ACE_BUILD_TOOL} install
)
else()
message(FATAL_ERROR
View
@@ -54,16 +54,23 @@ if(WIN32 AND MSVC)
)
elseif(UNIX)
if(APPLE)
- set(APPLE_BUILD && cd <SOURCE_DIR>/build/libs_release && install_name_tool -id "<INSTALL_DIR>/lib/libtbb.dylib" libtbb.dylib && install_name_tool -id "<INSTALL_DIR>/lib/libtbbmalloc.dylib" libtbbmalloc.dylib && cd <SOURCE_DIR>/build/libs_debug && install_name_tool -id "<INSTALL_DIR>/lib/libtbb_debug.dylib" libtbb_debug.dylib && install_name_tool -id "<INSTALL_DIR>/lib/libtbbmalloc_debug.dylib" libtbbmalloc_debug.dylib)
+ set(APPLE_BUILD cd <SOURCE_DIR>/build/libs_release && install_name_tool -id "<INSTALL_DIR>/lib/libtbb.dylib" libtbb.dylib && install_name_tool -id "<INSTALL_DIR>/lib/libtbbmalloc.dylib" libtbbmalloc.dylib && cd <SOURCE_DIR>/build/libs_debug && install_name_tool -id "<INSTALL_DIR>/lib/libtbb_debug.dylib" libtbb_debug.dylib && install_name_tool -id "<INSTALL_DIR>/lib/libtbbmalloc_debug.dylib" libtbbmalloc_debug.dylib)
endif()
+
+ if(${CMAKE_BUILD_TOOL} STREQUAL gmake)
+ set(TBB_BUILD_TOOL gmake)
+ else()
+ set(TBB_BUILD_TOOL make)
+ endif()
+
ExternalProject_Add(TBB_Project
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
- BUILD_COMMAND make -j2 -C <SOURCE_DIR> ${APPLE_BUILD} # export arch="ia32" &&
- INSTALL_COMMAND ""
+ BUILD_COMMAND ${TBB_BUILD_TOOL} -j2 -C <SOURCE_DIR> # export arch="ia32" &&
+ INSTALL_COMMAND ${APPLE_BUILD}
)
else()
message(FATAL_ERROR
View
@@ -77,9 +77,12 @@ target_link_libraries(game
)
if(UNIX)
- target_link_libraries(game
- dl
- )
+ # Both systems don't have libdl and don't need them
+ if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD OR ${CMAKE_SYSTEM_NAME} STREQUAL NetBSD))
+ target_link_libraries(game
+ dl
+ )
+ endif()
endif()
add_dependencies(game revision.h)

0 comments on commit 4e1995b

Please sign in to comment.