From e891adc8a4343ed24e52f2cb5f9f88f3df58e44b Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 22 Jan 2014 10:23:08 +1100 Subject: [PATCH] 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! --- CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3aeb6cdf9..3e2a60649 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,10 +103,6 @@ else() include_directories(${OGGVORBIS_INCLUDE_DIRS}) endif() -# CURL -find_package(CURL REQUIRED) -include_directories(${CURL_INCLUDE_DIRS}) - # Fribidi if(USE_FRIBIDI) find_package(Fribidi) @@ -238,6 +234,15 @@ target_link_libraries(supertuxkart ${OPENAL_LIBRARY} ${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) # 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 : @@ -274,6 +279,10 @@ endif() if(MSVC) target_link_libraries(supertuxkart iphlpapi.lib) + add_custom_command(TARGET supertuxkart POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${PROJECT_SOURCE_DIR}/dependencies/dll" + $) endif() # Optional tools