diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fe1b737c..0887f25b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $) +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.