Warning, /education/labplot/src/3rdparty/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 IF (APPLE)
0002 add_subdirectory(kdmactouchbar)
0003 ENDIF ()
0004
0005 IF (BUILD_READSTAT)
0006 include(ExternalProject)
0007
0008 set(build_dir ${CMAKE_BINARY_DIR}/src/3rdparty)
0009 set(install_dir ${build_dir}/install)
0010 file(MAKE_DIRECTORY ${install_dir}/lib)
0011 file(MAKE_DIRECTORY ${install_dir}/include)
0012
0013 set(ext_src ${build_dir}/readstat/src/readstat)
0014 set(ext_version "1.1.4")
0015 #if(WIN32)
0016 # set(ext_url http://sourceforge.net/projects/kst/files/3rdparty/zlib-develop-mingw-fixed.zip)
0017 # set(ext_configure cmake ${ext_src} ${generator} -DBUILD_SHARED_LIBS=0 ${rc_compiler} ${install_prefix} ${build_type})
0018 # set(ext_install ${install_target})
0019 # set(ext_insource OFF )
0020 # set(zlib_library libzlibstatic.a)
0021 # set(ext_make ${kst_make_program})
0022 #else()
0023 set(ext_url https://github.com/WizardMac/ReadStat/releases/download/v${ext_version}/readstat-${ext_version}.tar.gz)
0024 # --prefix=${install_dir} does not work with spaces
0025 set(ext_configure ${ext_src}/configure --enable-static --disable-shared)
0026 set(ext_insource ON)
0027 set(ext_make ${CMAKE_MAKE_PROGRAM} CXXFLAGS=-fPIC CFLAGS=-fPIC)
0028 set(readstat_library libreadstat.a)
0029 #endif()
0030 ExternalProject_Add(3rdparty_readstat
0031 PREFIX ${build_dir}/readstat
0032 URL ${ext_url}
0033 SOURCE_DIR ${ext_src}
0034 CONFIGURE_COMMAND ${ext_configure}
0035 BUILD_IN_SOURCE ${ext_insource}
0036 BUILD_COMMAND ${ext_make}
0037 # libtool install does not work with spaces
0038 #INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
0039 INSTALL_COMMAND cp -av .libs/${readstat_library} ../../../install/lib/ && cp -av src/readstat.h ../../../install/include/)
0040 ENDIF ()
0041
0042 # preview.sty
0043 install(FILES preview.sty DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/latex)
0044