X-Git-Url: https://git.piment-noir.org/?p=deb_x265.git;a=blobdiff_plain;f=source%2FCMakeLists.txt;h=75b5eb439284fee7d1e9fa4319e3f723e0b00d79;hp=ba63f819d457bac5b1bdda360547bdfbd9fb16a2;hb=b53f7c52d8280ab63876efd6eb292c21430ac607;hpb=5c9b45285dd64723ad1dac380b98a7b1f3095674 diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ba63f81..75b5eb4 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -21,7 +21,7 @@ include(CheckSymbolExists) include(CheckCXXCompilerFlag) # X265_BUILD must be incremented each time the public API is changed -set(X265_BUILD 35) +set(X265_BUILD 40) configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" "${PROJECT_BINARY_DIR}/x265.def") configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" @@ -63,6 +63,12 @@ if(UNIX) endif() endif(UNIX) +if(X64 AND NOT WIN32) + option(ENABLE_PIC "Enable Position Independent Code" ON) +else() + option(ENABLE_PIC "Enable Position Independent Code" OFF) +endif(X64 AND NOT WIN32) + # Compiler detection if(CMAKE_GENERATOR STREQUAL "Xcode") set(XCODE 1) @@ -121,9 +127,9 @@ endif() if(GCC) add_definitions(-Wall -Wextra -Wshadow) add_definitions(-D__STDC_LIMIT_MACROS=1) - if(X64 AND NOT WIN32) - add_definitions(-fPIC) - endif(X64 AND NOT WIN32) + if(ENABLE_PIC) + add_definitions(-fPIC) + endif(ENABLE_PIC) if(X86 AND NOT X64) add_definitions(-march=i686) endif()