ensure -fPIC

This commit is contained in:
Vitor Santos Costa 2016-12-16 17:22:50 +00:00
parent 747b0e9501
commit 6aaa32363c

View File

@ -13,14 +13,13 @@ if (ANDROID)
else ()
cmake_minimum_required(VERSION 2.8)
include(CMakeToolsHelpers OPTIONAL)
endif()
set(
CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/cmake")
CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/cmake"
)
include(CheckIncludeFiles)
include(CheckLibraryExists)
@ -53,6 +52,7 @@ if(NOT COMMAND find_host_program)
endif()
option(BUILD_SHARED_LIBS "Build shared library" ON)
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
include(Prelims NO_POLICY_SCOPE)
@ -83,7 +83,8 @@ if (MYSQL_POSTGRES)
add_definitions(= -DMYDDAS_POSTGRES=1)
endif()
if (ANDROID)
if (ANDROID)
ADD_SUBDIRECTORY(os)
ADD_SUBDIRECTORY(OPTYap)
@ -110,16 +111,16 @@ endif ()
if (WIN32)
list (APPEND YLIBS $<TARGET_OBJECTS:YapC++>)
endif()
endif()
add_component (core
${ENGINE_SOURCES}
${SWIG_FILES}
${C_INTERFACE_SOURCES}
${STATIC_SOURCES}
${ALL_SOURCES}
)
add_component (core
${ENGINE_SOURCES}
${SWIG_FILES}
${C_INTERFACE_SOURCES}
${STATIC_SOURCES}
${ALL_SOURCES}
)
add_library( # Sets the name of the library.