]> granicus.if.org Git - taglib/commitdiff
Merge branch 'cmake-allow-BUILD_SHARED_LIBS-to-drive-ENABLE_STATIC' of https://github...
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 2 Dec 2015 05:21:58 +0000 (14:21 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 2 Dec 2015 05:21:58 +0000 (14:21 +0900)
# Conflicts:
# CMakeLists.txt
# examples/CMakeLists.txt

1  2 
CMakeLists.txt
examples/CMakeLists.txt

diff --cc CMakeLists.txt
index 9491d47f3f70bd7287e1a4e3835d0972a7da867a,6265bb2f438da7659bbc3477458b9babe4a8933b..b01022ceb3d9f4b84ff06c63bbd5d33a8fbfe53e
@@@ -8,34 -8,24 +8,34 @@@ endif(
  
  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
  
- option(ENABLE_STATIC "Make static version of libtag" OFF)
- if(ENABLE_STATIC)
+ if(DEFINED ENABLE_STATIC)
+   message(FATAL_ERROR "This option is no longer available, use BUILD_SHARED_LIBS instead")
+ endif()
+ if(NOT BUILD_SHARED_LIBS)
    add_definitions(-DTAGLIB_STATIC)
-   set(BUILD_SHARED_LIBS OFF)
- else()
-   set(BUILD_SHARED_LIBS ON)
  endif()
 -OPTION(ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically"  OFF)
 +option(ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically" OFF)
 +
 +option(ENABLE_CCACHE "Use ccache when building libtag" OFF)
 +if(ENABLE_CCACHE)
 +  find_program(CCACHE_FOUND ccache)
 +  if(CCACHE_FOUND)
 +    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
 +    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
 +  endif()
 +endif()
  
 -option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden"  OFF)
 +option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF)
  if(VISIBILITY_HIDDEN)
 -  add_definitions (-fvisibility=hidden)
 +  add_definitions(-fvisibility=hidden)
  endif()
  
 -option(BUILD_TESTS "Build the test suite"  OFF)
 -option(BUILD_EXAMPLES "Build the examples"  OFF)
 +option(BUILD_TESTS "Build the test suite" OFF)
 +option(BUILD_EXAMPLES "Build the examples" OFF)
 +option(BUILD_BINDINGS "Build the bindings" ON)
  
 -option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs"  OFF)
 +option(NO_ITUNES_HACKS "Disable workarounds for iTunes bugs" OFF)
  
  add_definitions(-DHAVE_CONFIG_H)
  set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/")
index 7792a2a641568b5c8ae86d24bbf5dfd9c52d29a4,b25d4ff688742c56f6e01a8cdd38bd49e830d213..1d59f9020ccf47db8cca8c33fa61febfe3665ccc
@@@ -1,16 -1,15 +1,16 @@@
 -if(BUILD_EXAMPLES)
 -INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../taglib
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v1
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2
 -                   ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/c/  )
 +include_directories(
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v1
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/mpeg/id3v2
 +  ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/c/
 +)
  
- if(ENABLE_STATIC)
+ if(NOT BUILD_SHARED_LIBS)
 -    add_definitions(-DTAGLIB_STATIC)
 +  add_definitions(-DTAGLIB_STATIC)
- endif(ENABLE_STATIC)
+ endif()
  
  ########### next target ###############