Sources/CMakeLists.txt: Added missing find_packge(SDL REQUIRED) to link in the SDL1.2 libraries via ${SDL_LIBRARY} generate variable

and added to the target_link_libraries for SeriousSam and SeriousSamDedicated. I don't know not linking the SDL library was

	the intended outcome but SeriousSam* was failing to link to libSeriousEngine.a.
This commit is contained in:
Salamanderrake 2016-04-02 22:33:11 -04:00 committed by Ryan C. Gordon
parent a96fe8de8b
commit cdcf6afc34

View File

@ -4,6 +4,8 @@ project(SeriousEngine)
# Set @rpath for Mac OS X shared library install names. # Set @rpath for Mac OS X shared library install names.
#cmake_policy(SET CMP0042 NEW) #cmake_policy(SET CMP0042 NEW)
# Needed to find the SDL1.2 library files
find_package(SDL REQUIRED)
# Set up some sanity stuff... # Set up some sanity stuff...
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
@ -621,12 +623,14 @@ if(LINUX)
target_link_libraries(SeriousSam "m") target_link_libraries(SeriousSam "m")
target_link_libraries(SeriousSam "dl") target_link_libraries(SeriousSam "dl")
target_link_libraries(SeriousSam "pthread") target_link_libraries(SeriousSam "pthread")
target_link_libraries(SeriousSam ${SDL_LIBRARY})
if(BUILD_DEDICATED_SERVER) if(BUILD_DEDICATED_SERVER)
set_target_properties(SeriousSamDedicated PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN") set_target_properties(SeriousSamDedicated PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN")
target_link_libraries(SeriousSamDedicated "m") target_link_libraries(SeriousSamDedicated "m")
target_link_libraries(SeriousSamDedicated "dl") target_link_libraries(SeriousSamDedicated "dl")
target_link_libraries(SeriousSamDedicated "pthread") target_link_libraries(SeriousSamDedicated "pthread")
target_link_libraries(SeriousSamDedicated ${SDL_LIBRARY})
endif() endif()
endif() endif()