mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
- added FreeBSD patches from moellemeister (thanks)
This commit is contained in:
@@ -13,18 +13,28 @@
|
|||||||
# a generic (version-independent) include directory for LUA...
|
# a generic (version-independent) include directory for LUA...
|
||||||
|
|
||||||
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||||
SET(LUA_FIND_QUIETLY TRUE)
|
#SET(LUA_FIND_QUIETLY TRUE)
|
||||||
ENDIF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
ENDIF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||||
|
|
||||||
FIND_PATH(LUA_INCLUDE_DIR NAMES lua.hpp
|
FIND_PATH(LUA_INCLUDE_DIR NAMES lua.hpp
|
||||||
PATHS /usr/include
|
PATHS /usr/include
|
||||||
/usr/include/lua
|
/usr/include/lua
|
||||||
/usr/include/lua5.1
|
/usr/include/lua5.1
|
||||||
|
IF(FreeBSD)
|
||||||
|
SET(PATHS "/usr/local/include/lua51")
|
||||||
|
ENDIF()
|
||||||
$ENV{LUA_HOME}
|
$ENV{LUA_HOME}
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(LUA_LIBRARIES NAMES lua5.1 lua
|
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)
|
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
|
||||||
SET(LUA_FOUND TRUE)
|
SET(LUA_FOUND TRUE)
|
||||||
|
@@ -12,6 +12,12 @@ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
|
|||||||
|
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32)
|
||||||
# It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'.
|
# 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)
|
FIND_PACKAGE(wxWidgets COMPONENTS core base gl REQUIRED)
|
||||||
|
|
||||||
# wxWidgets include (this will do all the magic to configure everything)
|
# wxWidgets include (this will do all the magic to configure everything)
|
||||||
|
@@ -26,7 +26,13 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#else
|
||||||
#include <sys/sendfile.h>
|
#include <sys/sendfile.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@@ -3,9 +3,13 @@
|
|||||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/source/tools/glexemel)
|
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/source/tools/glexemel)
|
||||||
add_executable(g2xml g2xml.c g3dv4.h)
|
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)
|
find_package(LibXml2)
|
||||||
IF(LIBXML2_FOUND)
|
IF(LIBXML2_FOUND)
|
||||||
include_directories(${LIBXML2_INCLUDE_DIR})
|
include_directories(${CMAKE_INCLUDE_PATH} ${LIBXML2_INCLUDE_DIR})
|
||||||
add_executable(xml2g xml2g.c g3dv4.h)
|
add_executable(xml2g xml2g.c g3dv4.h)
|
||||||
target_link_libraries(xml2g ${LIBXML2_LIBRARIES})
|
target_link_libraries(xml2g ${LIBXML2_LIBRARIES})
|
||||||
ELSE()
|
ELSE()
|
||||||
|
Reference in New Issue
Block a user