fixed static linking of sfml
This commit is contained in:
parent
f300396f10
commit
5952b7c8c3
@ -14,7 +14,7 @@ set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
configure_file (
|
||||
"SparrowConfig.h.in"
|
||||
"../cmaketemplate/SparrowConfig.h.in"
|
||||
"${PROJECT_BINARY_DIR}/Config.h"
|
||||
)
|
||||
|
||||
@ -111,17 +111,30 @@ if(USE_SFML)
|
||||
${LIB_PATHS}
|
||||
)
|
||||
|
||||
|
||||
|
||||
set(USE_OPENGL True)
|
||||
|
||||
add_definitions(-DSFML_STATIC)
|
||||
|
||||
LIST(APPEND LIB_DEPENDENCIES_LIST ${SFML_LIBRARY_AUDIO} ${SFML_LIBRARY_GRAPHICS} ${SFML_LIBRARY_SYSTEM} ${SFML_LIBRARY_WINDOW})
|
||||
|
||||
if(WIN32)
|
||||
LIST(APPEND LIB_DEPENDENCIES_LIST winmm gdi32 freetype jpeg openal32 flac vorbisenc vorbisfile vorbis ogg)
|
||||
find_library(SFML_DEPENDENCIES
|
||||
NAMES
|
||||
winmm gdi32 freetype jpeg openal32 flac vorbisenc vorbisfile vorbis ogg
|
||||
PATHS
|
||||
${LIB_PATHS}
|
||||
)
|
||||
LIST(APPEND LIB_DEPENDENCIES_LIST )
|
||||
elseif(UNIX)
|
||||
LIST(APPEND LIB_DEPENDENCIES_LIST freetype jpeg openal flac vorbisenc vorbisfile vorbis ogg)
|
||||
endif()
|
||||
find_library(SFML_DEPENDENCIES
|
||||
NAMES
|
||||
freetype jpeg openal flac vorbisenc vorbisfile vorbis ogg
|
||||
PATHS
|
||||
${LIB_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
LIST(APPEND LIB_DEPENDENCIES_LIST ${SFML_LIBRARY_WINDOW} ${SFML_LIBRARY_GRAPHICS} ${SFML_LIBRARY_SYSTEM} ${SFML_LIBRARY_AUDIO} ${SFML_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
if(USE_RENDERER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user