Improved cmake configuration to copy the dlls into the bin

folder, which makes it much easier to start STK from within VS
(just set supertuxkart to be the startup project). Note that
this requires the new dependencies_for_0.8.2.zip to be installed!
This commit is contained in:
hiker 2014-01-22 10:23:08 +11:00
parent a6108181e8
commit e891adc8a4

View File

@ -103,10 +103,6 @@ else()
include_directories(${OGGVORBIS_INCLUDE_DIRS}) include_directories(${OGGVORBIS_INCLUDE_DIRS})
endif() endif()
# CURL
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})
# Fribidi # Fribidi
if(USE_FRIBIDI) if(USE_FRIBIDI)
find_package(Fribidi) find_package(Fribidi)
@ -238,6 +234,15 @@ target_link_libraries(supertuxkart
${OPENAL_LIBRARY} ${OPENAL_LIBRARY}
${OPENGL_LIBRARIES}) ${OPENGL_LIBRARIES})
# CURL
if(WIN32)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/libcurldll.a)
else()
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})
endif()
if(APPLE) if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has # In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases : # unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :
@ -274,6 +279,10 @@ endif()
if(MSVC) if(MSVC)
target_link_libraries(supertuxkart iphlpapi.lib) target_link_libraries(supertuxkart iphlpapi.lib)
add_custom_command(TARGET supertuxkart POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${PROJECT_SOURCE_DIR}/dependencies/dll"
$<TARGET_FILE_DIR:supertuxkart>)
endif() endif()
# Optional tools # Optional tools