Fix flags to always compile with libcurl (as HomeView needs net-lib to load news)

This commit is contained in:
David Capello 2015-04-23 19:14:13 -03:00
parent 5ced5b2ee6
commit d7bf504887
3 changed files with 19 additions and 19 deletions

View File

@ -154,7 +154,7 @@ if(UNIX)
endif() endif()
###################################################################### ######################################################################
# Updater # Liburl
if (CMAKE_USE_PTHREADS_INIT) if (CMAKE_USE_PTHREADS_INIT)
set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT}) set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT})
@ -164,22 +164,24 @@ if(NOT "${CUSTOM_WEBSITE_URL}" STREQUAL "")
add_definitions(-DCUSTOM_WEBSITE_URL="${CUSTOM_WEBSITE_URL}") add_definitions(-DCUSTOM_WEBSITE_URL="${CUSTOM_WEBSITE_URL}")
endif() endif()
if(ENABLE_UPDATER) if(USE_SHARED_CURL)
if(USE_SHARED_CURL) find_library(LIBCURL_LIBRARY NAMES curl)
find_library(LIBCURL_LIBRARY NAMES curl) find_path(LIBCURL_INCLUDE_DIR NAMES curl/curl.h)
find_path(LIBCURL_INCLUDE_DIR NAMES curl/curl.h)
set(libs3rdparty ${libs3rdparty} ${LIBCURL_LIBRARY}) set(libs3rdparty ${libs3rdparty} ${LIBCURL_LIBRARY})
include_directories(${LIBCURL_INCLUDE_DIR}) include_directories(${LIBCURL_INCLUDE_DIR})
else() else()
set(libs3rdparty ${libs3rdparty} libcurl) set(libs3rdparty ${libs3rdparty} libcurl)
include_directories(${CURL_DIR}/include) include_directories(${CURL_DIR}/include)
if(CURL_STATICLIB) if(CURL_STATICLIB)
add_definitions(-DCURL_STATICLIB) add_definitions(-DCURL_STATICLIB)
endif()
endif() endif()
set(aseprite_libraries ${aseprite_libraries} updater-lib net-lib) set(aseprite_libraries ${aseprite_libraries} net-lib)
endif()
if(ENABLE_UPDATER)
set(aseprite_libraries ${aseprite_libraries} updater-lib)
add_definitions(-DENABLE_UPDATER) add_definitions(-DENABLE_UPDATER)
endif() endif()
@ -217,9 +219,9 @@ add_subdirectory(scripting)
add_subdirectory(she) add_subdirectory(she)
add_subdirectory(ui) add_subdirectory(ui)
add_subdirectory(undo) add_subdirectory(undo)
add_subdirectory(net)
if(ENABLE_UPDATER) if(ENABLE_UPDATER)
add_subdirectory(net)
add_subdirectory(updater) add_subdirectory(updater)
endif() endif()

View File

@ -1,7 +1,5 @@
# ASEPRITE # ASEPRITE
# Copyright (C) 2001-2013 David Capello # Copyright (C) 2001-2013, 2015 David Capello
add_definitions(-DCURL_STATICLIB)
add_library(net-lib add_library(net-lib
http_headers.cpp http_headers.cpp

View File

@ -32,7 +32,7 @@ if(NOT USE_SHARED_GTEST)
add_subdirectory(gtest) add_subdirectory(gtest)
endif() endif()
if(ENABLE_UPDATER AND NOT USE_SHARED_CURL) if(NOT USE_SHARED_CURL)
set(BUILD_RELEASE_DEBUG_DIRS ON BOOL) set(BUILD_RELEASE_DEBUG_DIRS ON BOOL)
add_subdirectory(curl) add_subdirectory(curl)
endif() endif()