Unverified Commit 820ca9bd authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Merge pull request #120 from Kelvinrr/cmake

Adding support for libisis python bindings
parents d457dace 1c7ea0a9
Loading
Loading
Loading
Loading
+160 −0
Original line number Diff line number Diff line
@@ -43,3 +43,163 @@ print.prt
*/tsts/*/output/*
*/build/
*/install/

# Created by https://www.gitignore.io/api/c++

### C++ ###
# Prerequisites
*.d
*.hpp
*.sbf

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app


# Created by https://www.gitignore.io/api/osx

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


# Created by https://www.gitignore.io/api/python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
+0 −0

File moved.

configure.py

0 → 100644
+88 −0
Original line number Diff line number Diff line
import os
import sys
import sipconfig
import sipdistutils
import PyQt5
import subprocess
import argparse

from os.path import splitext
from os.path import dirname
from glob import glob
from distutils.spawn import find_executable

from PyQt5.QtCore import PYQT_CONFIGURATION
from plio.utils.utils import find_in_dict
from PyQt5.QtCore import PYQT_CONFIGURATION as qtconfigdict
from sipconfig import ModuleMakefile

def main (module):
    # The name of the SIP build file generated by SIP and used by the build
    # system.
    sipy_sip_dir = "sipfiles/"
    module = sipy_sip_dir+module + '.sip'
    build_file = "bundle"+".sbf"
    target = module+".so"

    # Get the extra SIP flags needed by the imported qt module.  Note that
    # this normally only includes those flags (-x and -t) that relate to SIP's
    # versioning system.
    qt_sip_flags = qtconfigdict["sip_flags"]

    # sip_bin = current_env_path + "/bin/sip"
    sip_bin = find_executable('sip')
    pyqt_sip_dir = dirname(dirname(sip_bin)) + "/share/sip/PyQt5"

    # Get the PyQt configuration information.
    config = sipconfig.Configuration()

    # Run SIP to generate the code.  Note that we tell SIP where to find the qt
    # module's specification files using the -I flag.

    errcode = os.system(" ".join([sip_bin, "-e","-c", ".", "-b", build_file, "-I",
        pyqt_sip_dir, qt_sip_flags, module]))

    if errcode != 0:
        print('sip exited with non zero error code: {}'.format(errcode))

    # We are going to install the SIP specification file for this module and
    # its configuration module.
    installs = []
    installs.append([module, os.path.join(pyqt_sip_dir, "isis3")])

    isis_root = os.getenv("ISISROOT")
    if not isis_root:
        raise("Please set ISIS")

    extra_libs = ["$(ALLLIBS)", "-Wl,-rpath,"+isis_root+"/lib", "-Wl,-rpath,"+isis_root+"/3rdParty/lib"]

    makefile = ModuleMakefile(configuration=config, build_file=build_file, installs=installs)
    makefile.extra_cxxflags = ["$(ALLINCDIRS)", "-Wstrict-aliasing=0", "-Wno-unused-variable"]
    makefile.extra_lflags =  ["$(ALLLIBDIRS)"]
    makefile.extra_include_dirs = [x[0] for x in os.walk('incs/')]
    makefile.extra_lib_dirs = [isis_root + '/3rdParty/lib', isis_root + 'lib']
    makefile.generate()

    # add import line for isismake.os
    isis_makefile = "include " + isis_root + "/make/isismake.os"

    with open("Makefile", 'r+') as f:
        content = f.read()
        content = content.replace("LIBS =", "LIBS = " + ' '.join(extra_libs))
        f.seek(0, 0)
        f.write(isis_makefile + '\n\n' + content)

if __name__ == "__main__":
    clean = ['cpp', 'c', 'h', 'hpp', 'o', 'sbf']

    # If clean is passed in, clear up all the files genreated by the scripts
    if len(sys.argv) > 1 and sys.argv[1] == 'clean':
        files = []
        for filetype in clean:
            files.extend(glob('*.{}'.format(filetype)))

        for f in files:
            os.remove(f)
        exit()

    main('master')
+29 −29
Original line number Diff line number Diff line
@@ -8,35 +8,36 @@ channels:
  - jlaura
  - defaults
dependencies:
  - ca-certificates==2017.08.26=h1d4fec5_0
  - ca-certificates==2017.08.26
  - dbus==1.10.20=0
  - future==0.16.0=y27_1
  - gst-plugins-base=1.8.0=0
  - future==0.16.0
  - gst-plugins-base
  - gstreamer==1.8.0=0
  - jsoncpp==1.8.3=h3a67955_0
  - libgcc==4.8.5=1
  - libgcc-ng==7.2.0=h7cc24e2_2
  - jsoncpp==1.8.3
  - libgfortran==3.0=0
  - libstdcxx-ng==7.2.0=h7a57d05_2
  - libstdcxx-ng==7.2.0
  - qwt=6.1.3
  - pyqt=5.6.0
  - sip=4.18
  - libxcb==1.12=1
  - mysql==5.7.20=h55eaa98_0
  - mysql==5.7.20
  - ncurses==5.9=10
  - ninja==1.7.2=0
  - patchelf==0.9=hf79760b_2
  - pip==9.0.1=py27_1
  - setuptools=38.5.1=py27_0
  - wheel==0.30.0=py27h2bc6bb2_1
  - patchelf==0.9
  - pip==9.0.1
  - setuptools=38.5.1
  - wheel==0.30.0
  - xerces-c==3.1.4=0
  - xz==5.2.3=0
  - zlib==1.2.11=0
  - blas==1.1=openblas
  - boost==1.65.1=py27_0
  - boost-cpp==1.65.1=1
  - boost==1.65.1
  - boost-cpp==1.65.1
  - bzip2==1.0.6=1
  - cairo==1.14.6=4
  - certifi==2018.1.18=py27_0
  - certifi==2018.1.18
  - cmake==3.9.1=0
  - cspice==66=0
  - cspice==66-0
  - curl==7.55.1=0
  - doxygen==1.8.14=0
  - eigen==3.3.3=0
@@ -48,7 +49,7 @@ dependencies:
  - freeglut==3.0.0=4
  - freetype==2.7=1
  - geos==3.5.1=1
  - geotiff==1.4.2=1
  - geotiff==1.4.2
  - gettext==0.19.8.1=0
  - giflib==5.1.4=0
  - glib==2.51.4=0
@@ -56,7 +57,7 @@ dependencies:
  - gsl==2.2.1=blas_openblas_3
  - harfbuzz==1.3.4=2
  - hdf5==1.8.18=2
  - icu==58.2=0
  - icu==58.2
  - jasper==1.900.1=1
  - jbig==2.1=0
  - jpeg==9b=2
@@ -80,24 +81,24 @@ dependencies:
  - mysql-connector-c==6.1.6=0
  - nanoflann==1.2.2=0
  - nn==1.86.0=2
  - numpy==1.13.3=py27_blas_openblas_200
  - numpy==1.13.3=py36_blas_openblas_200
  - openblas==0.2.19=2
  - opencv==3.2.0=np113py27_blas_openblas_203
  - opencv==3.2.0=np113py36_blas_openblas_203
  - openssl==1.0.2n=0
  - pcre==8.39=0
  - pixman==0.34.0=1
  - proj4==4.9.3=5
  - pthread-stubs==0.3=1
  - python==2.7.14=2
  - python==3.6
  - readline==6.2=0
  - rhash==1.3.4=0
  - six==1.11.0=py27_1
  - six==1.11.0
  - sqlite==3.13.0=1
  - suitesparse==4.5.4=blas_openblas_200
  - superlu==5.2.1=blas_openblas_201
  - tbb==4.4_20160526=1
  - tk==8.5.19=2
  - vtk==8.1.0=py27_mesalib_0
  - vtk==8.1.0
  - x264==20131217=3
  - xorg-kbproto==1.0.7=1
  - xorg-libx11==1.6.4=6
@@ -106,21 +107,20 @@ dependencies:
  - xorg-libxrender==0.9.10=0
  - xorg-renderproto==0.11.1=1
  - xorg-xproto==7.0.31=6
  - bz2file==0.98=py27_0
  - bz2file==0.98
  - cloog==0.18.0=0
  - gcc==4.8.5=7
  - isl==0.12.2=0
  - protobuf==2.6.1=py27_1
  - protobuf==3.5.1
  - system==5.8=2
  - libprotobuf==2.6.1=0
  - libprotobuf==3.2.0=0
  - bullet==2.86.1=0
  - ds9==7.5=0
  - gmm==5.0=0
  - jama==125=0
  - pcl==1.8.1=0
  - qhull==7.2.0=0
  - qt==5.7.1=0
  - qwt==6.1.3=0
  - qt==5.6.2
  - qwt==6.1.3
  - tnt==126=0
  - xalan-c==1.11=0
prefix: /scratch/anaconda3/envs/isis
+234 −53
Original line number Diff line number Diff line
@@ -57,10 +57,8 @@ message("Detected Operating System: ${osVersionString}")
#  as a static library using some specialized code in Utilities.cmake.
set(BUILD_SHARED_LIBS ON)

# Specify flags used
# on linux, add the conda prefix to handle possible issues with rpaths at link time
# sometimes third parties do not set their rpaths correctly
set(thirdPartyCppFlags -Wall -std=c++11 -DISIS_LITTLE_ENDIAN=1 -fPIC -Wno-unused-parameter -Wno-overloaded-virtual  -Wl,-rpath,$ENV{CONDA_PREFIX}/lib)
# make sure to leave rpaths untouched on install 
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Specify user options that can be passed in with the initial CMake command.
option(isis3Data       "Directory containing Isis3Data"                 OFF )
@@ -71,7 +69,7 @@ option(buildMissions "Build the mission specific modules" ON )
option(buildStaticCore "Build libisis3 static as well as dynamic"       OFF )
option(buildTests      "Set up unit, application, and module tests."    ON  )
option(JP2KFLAG        "Whether or not to build using JPEG2000 support" ON  )
option(develop         "Use a devleopment configuration"                ON  )
option(pybindings      "Turn on to build Python bindings"               ON )

# if cmake install prefix is not set, and conda env is activated, use the
# conda env as the install directory
@@ -79,40 +77,26 @@ if(DEFINED ENV{CONDA_PREFIX} AND CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
 set(CMAKE_INSTALL_PREFIX $ENV{CONDA_PREFIX})
endif()

message("Installing in: ${CMAKE_INSTALL_PREFIX}")

# options only allow on/off but this flag is piped into ISIS as ENABLEJP2K
# needs to be either 1 or 0 for C style true false
if(JP2KFLAG)
  set(JP2KFLAG 1)
endif()

# Prioritize passed in variables over env vars, probably a better way to do this
if(DEFINED ENV{ISIS3DATA} AND NOT isis3Data)
 set(isis3Data $ENV{ISIS3DATA})
  set(isis3Data ON)
endif()
if(DEFINED ENV{ISIS3TESTDATA} AND NOT isis3TestData)
 set(isis3TestData $ENV{ISIS3TESTDATA})
  set(isis3TestData ON)
endif()

if(EXISTS ${isis3Data})
 set(ENV{ISIS3DATA} "${isis3Data}")
  message("Using ISIS3DATA = $ENV{ISIS3DATA}")
else()
 message(WARNING "Isis3Data directory ${isis3Data} not found, unit tests will fail.")
 set(isis3Data OFF)
endif()

if(EXISTS ${isis3TestData})
 set(ENV{ISIS3TESTDATA} "${isis3TestData}")
  message("Using ISIS3TESTDATA = $ENV{ISIS3TESTDATA}")
else()
 message(WARNING "Isis3TestData directory ${isis3TestData} not found, application and module tests will fail.")
endif()

if(develop)

 set(isis3TestData OFF)
endif()

if(${testOutputDir} STREQUAL "OFF")
@@ -125,38 +109,243 @@ else()
 execute_process(COMMAND mkdir -p ${testOutputDir})
endif()

# Set the default library extension based on the platform
# inject ISISROOT
add_definitions( -DISISROOT="${CMAKE_SOURCE_DIR}" )
add_definitions( -DISISBUILDDIR="${CMAKE_BINARY_DIR}" )

message("CONFIGURATION")
message("\tBUILD STATIC CORE: ${buildStaticCore}")
message("\tBUILD TESTS: ${buildTests}")
message("\tBUILD CORE: ${buildCore}")
message("\tBUILD MISSIONS: ${buildMissions}")
message("\tJP2K SUPPORT: ${JP2KFLAG}")
message("\tPYTHON BINDINGS: ${pybindings}")
message("\tISIS3DATA: ${isis3Data}")
message("\tISISTESTDATA: ${isis3TestData}")
message("\tTEST OUTPUT DIR: ${testOutputDir}")
message("\tINSTALL PREFIX: ${CMAKE_INSTALL_PREFIX}")

#===============================================================================
#===============================================================================

# Set up Anaconda prefix in the case with a non-default conda env is activated
if(EXISTS $ENV{CONDA_PREFIX})
  message("CONDA PREFIX: $ENV{CONDA_PREFIX}")
  list(APPEND CMAKE_FIND_ROOT_PATH $ENV{CONDA_PREFIX}
                                   $ENV{CONDA_PREFIX}/lib/cmake/Qt5)
endif()

# options only allow on/off but this flag is piped into ISIS as ENABLEJP2K
# needs to be either 1 or 0 for C style true false
if(JP2KFLAG)
 set(JP2KFLAG 1)
endif()

 # Set up the ctest tool which is used to run all of the tests.
 enable_testing()
 include(CTest)

# Specify flags used
# on linux, add the conda prefix to handle possible issues with rpaths at link time
# sometimes third parties do not set their rpaths correctly
set(thirdPartyCppFlags -Wall
                       -std=c++11
                       -fPIC
                       -DISIS_LITTLE_ENDIAN=1
                       -fPIC -Wno-unused-parameter
                       -Wno-overloaded-virtual
                       -DGMM_USES_SUPERLU
                       -DENABLEJP2K=${JP2KFLAG}
                     )

# Flag to fix numeric literals problem with boost on linux
if(NOT APPLE)
  set(thirdPartyCppFlags ${thirdPartyCppFlags} -fext-numeric-literals
                                               -Wl,-rpath,$ENV{CONDA_PREFIX}/lib)
endif()

 # Append CPP flags set in the third party lib file to the string set in this file.
 string(REPLACE ";" " " FLAGS_STR "${thirdPartyCppFlags}")
 set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} ${FLAGS_STR}" )


# Paths to required executables
find_program(XALAN Xalan REQUIRED)
find_program(LATEX latex)
find_program(DOXYGEN NAME doxygen PATH_SUFFIXES doxygen REQUIRED)
find_program(UIC uic REQUIRED)
find_program(MOC moc REQUIRED)
find_program(RCC rcc REQUIRED)
find_program(PROTOC protoc REQUIRED)

find_package(Qt5 COMPONENTS
                Core
                Concurrent
                Gui
                Multimedia
                MultimediaWidgets
                Network
                OpenGL # Needed to install mesa-common-dev for this!
                PrintSupport
                Qml
                Quick
                Script
                ScriptTools
                Sql
                Svg
                Test
                WebChannel
                Widgets
                Xml
                XmlPatterns REQUIRED)

# Some of these will have non-traditional installs with version numbers in the paths in v007
# For these, we pass in a version number, and use it in the path suffix
# This only applies to v007, and outside of the building, we should only expect standard installs
# The v007-specific installs are listed beside their find_package calls below:
find_package(Boost     1.59.0  REQUIRED)
find_package(Bullet    2.86    REQUIRED)
find_package(Cholmod   4.4.5   REQUIRED)
find_package(CSPICE    65      REQUIRED)
find_package(Eigen             REQUIRED)
find_package(Embree    2.15.0  REQUIRED)
find_package(GeoTIFF   2       REQUIRED)
find_package(GMM       5.0     REQUIRED)
find_package(GSL       19      REQUIRED)
find_package(HDF5      1.8.15  REQUIRED)
find_package(Jama      125     REQUIRED)
find_package(NN                REQUIRED)
find_package(OpenCV    3.1.0   REQUIRED)
find_package(PCL       1.8     REQUIRED)
find_package(Protobuf  2.6.1   REQUIRED)
find_package(Qwt       6       REQUIRED)
find_package(SuperLU   4.3     REQUIRED)
find_package(TIFF      4.0.5   REQUIRED)
find_package(TNT       126     REQUIRED)
find_package(XercesC   3.1.2   REQUIRED)
find_package(X11       6       REQUIRED)
find_package(nanoflann         REQUIRED)
find_package(PNG               REQUIRED)
find_package(Kakadu)
find_package(Geos    3.5.0   REQUIRED)

# Im this case, we specify the version numbers being searched for in the non-traditional installs.
if(APPLE)
  set(SO ".dylib")
else()
  set(SO ".so")
  find_package(OpenGL            REQUIRED)
endif(APPLE)

if(pybindings)
 find_package(Python REQUIRED)
 find_package(Sip    REQUIRED)
endif()

# Iterate through all variables and extract the libraries and include directories
get_cmake_property(_variableNames VARIABLES) # Get All VARIABLES

set(ALLLIBDIRS "")
set(ALLLIBS "")
set(ALLINCDIRS "")

# Get all include dir variables
foreach (_variableName ${_variableNames})
#message("VAR=${_variableName}")
   if (_variableName MATCHES ".+_INCLUDE_DIR$")
     list(APPEND ALLINCDIRS "${${_variableName}}")
   elseif (_variableName MATCHES ".+_INCLUDE_PATH$")
     list(APPEND ALLINCDIRS "${${_variableName}}")
   endif(_variableName MATCHES ".+_INCLUDE_DIR$")
endforeach()

# get all Library variables
foreach (_variableName ${_variableNames})
   get_filename_component(LIBDIR "${${_variableName}}" DIRECTORY)
   if (_variableName MATCHES "^CMAKE+")
   elseif (_variableName MATCHES ".+_LIB$")
     list(APPEND ALLLIBDIRS "${LIBDIR}")
     list(APPEND ALLLIBS "${${_variableName}}")
   elseif (_variableName MATCHES ".+_LIBRARY$")
     list(APPEND ALLLIBDIRS "${LIBDIR}")
     list(APPEND ALLLIBS "${${_variableName}}")
   elseif (_variableName MATCHES ".+_LIBRARIES$")
     list(APPEND ALLLIBDIRS "${LIBDIR}")
     list(APPEND ALLLIBS "${${_variableName}}")
   endif()
endforeach()

# Sometimes we add the same lib more than once (especially with LIBDIRS)
list(REMOVE_DUPLICATES ALLLIBDIRS)
list(REMOVE_DUPLICATES ALLLIBS)
list(REMOVE_DUPLICATES ALLINCDIRS)

#===============================================================================
#===============================================================================

# Set python bindings configuration and set target for generating C++ files
if(pybindings)
  message("Configuring Python Bindings")

  if (NOT DEFINED PYINSTALL_DIR)
    set(PYINSTALL_DIR ${PYTHON_SITE_PACKAGES_DIR})
  endif()
  message("PYTHON BINDINGS INSTALL DIR: ${PYINSTALL_DIR}")

 # We need to get the locations for sip files, modules, etc.
 set(ISIS_SIP_DIR "${CMAKE_SOURCE_DIR}/sipfiles")
 set(ISIS_SIP_MODULE "${CMAKE_SOURCE_DIR}/sipfiles/master.sip")
 set(SIP_BUILD_FILE "isispy.sbf")
 set(ISIS_SIP_CODE_DIR ${CMAKE_BINARY_DIR}/sipsrc)

 # Create the output directory for the new .CPP files
 execute_process(COMMAND mkdir -p "${ISIS_SIP_CODE_DIR}")

 # get list of output files exepected from sip

 # get the PYQT configuration based flags from Python
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
                 "from PyQt5.QtCore import PYQT_CONFIGURATION as qtconfigdict;print(qtconfigdict['sip_flags'])"
                 OUTPUT_VARIABLE PYQT_SIP_FLAGS)

 # CMAKE doesn't handle spaces from python well when piping that into the
 # command because of white space and a trailing new line,
 # so we turn it into a list
 string(STRIP ${PYQT_SIP_FLAGS} PYQT_SIP_FLAGS)
 string(REPLACE " " ";" PYQT_SIP_FLAGS ${PYQT_SIP_FLAGS})
 message("Generating C++ code from sip files")
 execute_process(COMMAND ${SIP_BINARY_PATH} -e -o -c ${ISIS_SIP_CODE_DIR} -I ${SIP_DEFAULT_SIP_DIR}/PyQt5 ${PYQT_SIP_FLAGS} ${ISIS_SIP_MODULE})

 # add target so users can run the command after initial configuration
 add_custom_target(sipfiles
                  COMMAND ${SIP_BINARY_PATH} -e -o -c ${ISIS_SIP_CODE_DIR} -I ${SIP_DEFAULT_SIP_DIR}/PyQt5 ${PYQT_SIP_FLAGS} ${ISIS_SIP_MODULE}
                  COMMENT "Generating C++ code from sip files")

 file(GLOB SIP_GENERATED_SOURCE_FILES ${ISIS_SIP_CODE_DIR}/*.cpp)
 add_library(isispy MODULE ${SIP_GENERATED_SOURCE_FILES})
 target_link_libraries(isispy ${ALLLIBS})
 target_link_libraries(isispy isis3)
 set_target_properties(isispy PROPERTIES LINK_DEPENDS isis3)
 add_dependencies(isispy sipfiles)

 install(TARGETS isispy DESTINATION ${PYINSTALL_DIR})
endif()


#===============================================================================
#===============================================================================

# Start setting up the build
# Add extension to find fortran until .so symlink can be added to /usr/lib64
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.3 .so.6 .so.5)

# Set up all the third party library dependencies.
include(FindAllDependencies)

# Allow everything to include the 3rd party libraries
include_directories(SYSTEM ${ALLINCDIRS})
link_directories(${ALLLIBDIRS})

# inject ISISROOT
add_definitions( -DISISROOT="${CMAKE_SOURCE_DIR}" )
add_definitions( -DISISBUILDDIR="${CMAKE_BINARY_DIR}" )

# add isis headers
file(GLOB ISIS_HEADERS ${CMAKE_SOURCE_DIR}/src/*/objs/*/*.h
${CMAKE_SOURCE_DIR}/src/*/objs/*/*.hpp)
file(COPY ${ISIS_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/inc)

include_directories(${CMAKE_BINARY_DIR}/inc)

set(CORE_LIB_NAME isis3)

# Specify relative library include paths which will be set up on
@@ -166,7 +355,6 @@ if(APPLE)
else()
  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};$ORIGIN/../lib;$ORIGIN/../3rdParty/lib")
endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# We will set up some links with these files at the end of the install process so
#  make sure they are cleared at the start of the install process.
@@ -177,13 +365,6 @@ EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestP
install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/src/base/objs/Preference/TestPreferences ${CMAKE_INSTALL_PREFIX}/)")
install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_SOURCE_DIR}/IsisPreferences ${CMAKE_INSTALL_PREFIX}/)")

# Append CPP flags set in the third party lib file to the string set in this file.
string(REPLACE ";" " " FLAGS_STR "${thirdPartyCppFlags}")
set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} ${FLAGS_STR}" )
# Set up the ctest tool which is used to run all of the tests.
enable_testing()
include(CTest)

# Delete any existing plugin files in the build folder so they
#  don't get filled with duplicate entries.
file(GLOB existingPlugins "${CMAKE_BINARY_DIR}/plugins/*.plugin")
Loading