- added FreeBSD patches from moellemeister (thanks)
This commit is contained in:
parent
895dde0de6
commit
19ea6b4058
|
@ -13,18 +13,28 @@
|
|||
# a generic (version-independent) include directory for LUA...
|
||||
|
||||
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||
SET(LUA_FIND_QUIETLY TRUE)
|
||||
#SET(LUA_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||
|
||||
FIND_PATH(LUA_INCLUDE_DIR NAMES lua.hpp
|
||||
PATHS /usr/include
|
||||
/usr/include/lua
|
||||
/usr/include/lua5.1
|
||||
IF(FreeBSD)
|
||||
SET(PATHS "/usr/local/include/lua51")
|
||||
ENDIF()
|
||||
$ENV{LUA_HOME}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUA_LIBRARIES NAMES lua5.1 lua
|
||||
PATHS $ENV{LUA_HOME})
|
||||
PATHS
|
||||
IF(FreeBSD)
|
||||
SET(PATHS "/usr/local/lib/lua51")
|
||||
ENDIF()
|
||||
$ENV{LUA_HOME})
|
||||
|
||||
MESSAGE(STATUS "LUA_INC: ${LUA_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "LUA_LIB: ${LUA_LIBRARIES}")
|
||||
|
||||
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||
SET(LUA_FOUND TRUE)
|
||||
|
|
|
@ -12,6 +12,12 @@ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
|
|||
|
||||
IF(NOT WIN32)
|
||||
# It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'.
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
SET(wxWidgets_CONFIG_OPTIONS --prefix=/usr/local)
|
||||
MESSAGE(STATUS "Detected FreeBSD.....")
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(wxWidgets COMPONENTS core base gl REQUIRED)
|
||||
|
||||
# wxWidgets include (this will do all the magic to configure everything)
|
||||
|
|
|
@ -26,7 +26,13 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/uio.h>
|
||||
#else
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/source/tools/glexemel)
|
||||
add_executable(g2xml g2xml.c g3dv4.h)
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
SET(CMAKE_INCLUDE_PATH /usr/local/include)
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
|
||||
find_package(LibXml2)
|
||||
IF(LIBXML2_FOUND)
|
||||
include_directories(${LIBXML2_INCLUDE_DIR})
|
||||
include_directories(${CMAKE_INCLUDE_PATH} ${LIBXML2_INCLUDE_DIR})
|
||||
add_executable(xml2g xml2g.c g3dv4.h)
|
||||
target_link_libraries(xml2g ${LIBXML2_LIBRARIES})
|
||||
ELSE()
|
||||
|
|
Loading…
Reference in New Issue