mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Minor modifications to CMake files
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1753 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
a1eade38f4
commit
7696438a4a
@ -2,7 +2,7 @@
|
||||
# include the SFML specific macros
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/Macros.cmake)
|
||||
|
||||
# let CMake know about our additional libraries paths (on Windows)
|
||||
# let CMake know about our additional libraries paths (on Windows and OS X)
|
||||
if (WINDOWS)
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers")
|
||||
if(COMPILER_GCC)
|
||||
@ -10,6 +10,8 @@ if (WINDOWS)
|
||||
elseif(COMPILER_MSVC)
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-msvc")
|
||||
endif()
|
||||
elseif(MACOSX)
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/lib/")
|
||||
endif()
|
||||
|
||||
# add the SFML sources path
|
||||
|
@ -62,37 +62,19 @@ elseif(LINUX)
|
||||
${SRC}
|
||||
${SRCROOT}/Linux/RenderImageImplPBuffer.cpp
|
||||
${SRCROOT}/Linux/RenderImageImplPBuffer.hpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
set(SRC
|
||||
${SRC}
|
||||
${SRCROOT}/OSX/RenderImageImplPBuffer.cpp
|
||||
${SRCROOT}/OSX/RenderImageImplPBuffer.hpp
|
||||
)
|
||||
elseif(MACOSX)
|
||||
set(SRC
|
||||
${SRC}
|
||||
${SRCROOT}/OSX/RenderImageImplPBuffer.cpp
|
||||
${SRCROOT}/OSX/RenderImageImplPBuffer.hpp
|
||||
)
|
||||
endif()
|
||||
|
||||
# let CMake know about our additional graphics libraries paths (on Windows and OSX)
|
||||
if (WINDOWS)
|
||||
if (WINDOWS OR MACOSX)
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/freetype")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/GL")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/jpeg")
|
||||
|
||||
elseif (MACOSX)
|
||||
|
||||
# Add freetype search path
|
||||
#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/include/")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/freetype")
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/lib/")
|
||||
|
||||
# Add GLEW search path
|
||||
#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/include/")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/")
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/lib/")
|
||||
|
||||
# Add jpeg search path
|
||||
#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/include/jpeg")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/jpeg")
|
||||
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CMAKE_SOURCE_DIR}/extlibs/libs-osx/lib/")
|
||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${CMAKE_SOURCE_DIR}/extlibs/headers/jpeg")
|
||||
endif()
|
||||
|
||||
# find external libraries
|
||||
@ -103,6 +85,9 @@ find_package(JPEG REQUIRED)
|
||||
if(LINUX)
|
||||
find_package(X11 REQUIRED)
|
||||
endif()
|
||||
if(MACOSX)
|
||||
find_package(ZLIB REQUIRED)
|
||||
endif()
|
||||
|
||||
# add include paths of external libraries
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${JPEG_INCLUDE_DIR})
|
||||
@ -114,10 +99,9 @@ if(BUILD_SHARED_LIBS)
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${OPENGL_gl_LIBRARY})
|
||||
if(LINUX)
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${X11_LIBRARIES})
|
||||
endif()
|
||||
if(MACOSX)
|
||||
# We use static version of freetype so we need to link against zlib.
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} z "-framework AGL")
|
||||
elseif(MACOSX)
|
||||
# We use static version of freetype so we need to link against zlib.
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES} "-framework AGL")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user