Fixed mingw compilation
This commit is contained in:
parent
a0fc3c98e8
commit
b2f918455b
@ -51,6 +51,14 @@ set(STK_INSTALL_BINARY_DIR "bin" CACHE
|
||||
set(STK_INSTALL_DATA_DIR "share/supertuxkart" CACHE
|
||||
STRING "Install data folder to this directory, absolute or relative to CMAKE_INSTALL_PREFIX")
|
||||
|
||||
# These variables enable MSVC to find libraries located in "dependencies"
|
||||
if(WIN32)
|
||||
set(ENV{PATH} "$ENV{PATH};${PROJECT_SOURCE_DIR}/dependencies/include")
|
||||
set(ENV{LIB} ${PROJECT_SOURCE_DIR}/dependencies/lib)
|
||||
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
add_definitions(-D_IRR_STATIC_LIB_)
|
||||
endif()
|
||||
|
||||
# Build the Bullet physics library
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
|
||||
@ -63,7 +71,7 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT MINGW)
|
||||
# Build zlib library
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/zlib")
|
||||
@ -106,15 +114,6 @@ endif()
|
||||
# Set include paths
|
||||
include_directories(${STK_SOURCE_DIR})
|
||||
|
||||
# These variables enable MSVC to find libraries located in "dependencies"
|
||||
if(WIN32)
|
||||
set(ENV{PATH} "$ENV{PATH};${PROJECT_SOURCE_DIR}/dependencies/include")
|
||||
set(ENV{LIB} ${PROJECT_SOURCE_DIR}/dependencies/lib)
|
||||
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
add_definitions(-D_IRR_STATIC_LIB_)
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
|
||||
|
Loading…
Reference in New Issue
Block a user