Commit c0d0bbbf authored by Ghislain MARY's avatar Ghislain MARY

Some CMake fixes.

parent d04ac3ef
......@@ -35,6 +35,7 @@ set(PACKAGE_TARNAME "bctoolbox")
set(PACKAGE_URL "")
set(VERSION "${PACKAGE_VERSION}")
option(ENABLE_STATIC "Build static library (default is shared library)." NO)
option(ENABLE_POLARSSL "Enable polarssl support" ON)
option(ENABLE_MBEDTLS "Enable mabedtls support" ON)
......@@ -43,10 +44,6 @@ include(CheckSymbolExists)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
set(MSVC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/MSVC")
if(MSVC)
list(APPEND CMAKE_REQUIRED_INCLUDES ${MSVC_INCLUDE_DIR})
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if (ENABLE_MBEDTLS)
......@@ -101,10 +98,6 @@ elseif(ENABLE_POLARSSL AND POLARSSL_FOUND)
include_directories(${POLARSSL_INCLUDE_DIRS})
endif()
if(MSVC)
include_directories(${MSVC_INCLUDE_DIR})
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
......@@ -190,3 +183,4 @@ install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BcToolboxConfigVersion.cmake"
DESTINATION ${ConfigPackageLocation}
)
......@@ -41,6 +41,7 @@ if(ENABLE_STATIC)
else()
add_library(bctoolbox SHARED ${BCTOOLBOX_HEADER_FILES} ${BCTOOLBOX_SOURCE_FILES})
set_target_properties(bctoolbox PROPERTIES VERSION 0.0.0 SOVERSION 0)
set_target_properties(bctoolbox PROPERTIES LINKER_LANGUAGE "CXX")
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/bctoolbox.pdb
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment