function(xsdk_compiler_flags) message(STATUS "Using XSDK default compiler flags") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Debug" PARENT_SCOPE) endif() if(NOT user_BUILD_SHARED_LIBS) set(BUILD_SHARED_LIBS "ON" PARENT_SCOPE) endif() endfunction(xsdk_compiler_flags) function(xsdk_begin_package) if(USE_XSDK_DEFAULTS) message(STATUS "Using XSDK default configuration settings") set(user_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) endif() endfunction(xsdk_begin_package) function(xsdk_add_tpl name) if(USE_XSDK_DEFAULTS) set(TPL_ENABLE_${name} "" CACHE STRING "XSDK option to enable ${name} [ON|OFF]") set(TPL_${name}_INCLUDE_DIRS "" CACHE STRING "XSDK compatible flag to specify ${name} include dirs") set(TPL_${name}_LIBRARIES "" CACHE STRING "XSDK compatible flag to specify ${name} libraries") #set the non-xsdk enable flag set(ENABLE_${name} ${TPL_ENABLE_${name}} PARENT_SCOPE) #set the include path cmake searches list(APPEND CMAKE_INCLUDE_PATH ${TPL_${name}_INCLUDE_DIRS}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} PARENT_SCOPE) #set the library path cmake searches list(GET TPL_${name}_LIBRARIES 0 firstlib) get_filename_component(libdir ${firstlib} DIRECTORY) list(APPEND CMAKE_LIBRARY_PATH ${libdir}) set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} PARENT_SCOPE) endif() endfunction(xsdk_add_tpl)