libwinpr: add possibility of building WinPR as standalone
This commit is contained in:
parent
403d85f080
commit
24fc026783
@ -135,11 +135,6 @@ check_include_files(sys/strtio.h HAVE_SYS_STRTIO_H)
|
||||
|
||||
check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
|
||||
|
||||
# Libraries that we have a hard dependency on
|
||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR OR NOT DEFINED OPENSSL_LIBRARIES)
|
||||
find_required_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
# Mac OS X
|
||||
if(APPLE)
|
||||
if(IS_DIRECTORY /opt/local/include)
|
||||
|
@ -15,13 +15,60 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project(WinPR C)
|
||||
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
if(FREERDP_VERSION)
|
||||
set(FREERDP_BUILD)
|
||||
endif()
|
||||
|
||||
# Include cmake modules
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckStructHasMember)
|
||||
include(FindPkgConfig)
|
||||
include(TestBigEndian)
|
||||
|
||||
# Include our extra modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/)
|
||||
|
||||
include(AutoVersioning)
|
||||
include(ConfigOptions)
|
||||
include(BuildFeatureCheck)
|
||||
include(FindOptionalPackage)
|
||||
include(CheckCCompilerFlag)
|
||||
include(GNUInstallDirsWrapper)
|
||||
|
||||
# Soname versioning
|
||||
set(WINPR_VERSION_MAJOR "0")
|
||||
set(WINPR_VERSION_MINOR "1")
|
||||
set(WINPR_VERSION_REVISION "0")
|
||||
set(WINPR_VERSION "${WINPR_VERSION_MAJOR}.${WINPR_VERSION_MINOR}")
|
||||
set(WINPR_VERSION_FULL "${WINPR_VERSION}.${WINPR_VERSION_REVISION}")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
# Default to release build type
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# Default to build shared libs
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
# Libraries that we have a hard dependency on
|
||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR OR NOT DEFINED OPENSSL_LIBRARIES)
|
||||
find_required_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
if(FREERDP_BUILD)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
||||
else()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/winpr/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/winpr/config.h)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user