Commit 46c24d06 authored by jlaura's avatar jlaura Committed by Trent Hare
Browse files

Windows Build (#139)

* adds win build

* Windows build

* Updates submodules
parent a21916bf
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -7,18 +7,17 @@ platform:

configuration:
  - Release
  - Debug

environment:
  CSM_LIBRARY_PATH: C:\\Miniconda36-x64\lib
  CSM_INCLUDE_PATH: C:\\Miniconda36-x64\include

install:
  # - git submodule update --init --recursive
  # This pulls csm from conda
  # - cmd: call C:\\Miniconda36-x64\Scripts\activate.bat
  # - cmd: conda install -y -c usgs-astrogeology libcsm
  # - cmake .
  - git submodule update --init --recursive

before_build:
  - mkdir build
  - cd build
  
build_script:
  # - cmake --build . -- %MSBUILD_ARGS%
  - echo pass
  - cmake -G "Visual Studio 15 2017 Win64" -DBUILD_TESTS=OFF ..
  - cmake --build . --target ALL_BUILD --config Release


+6 −9
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ else()
			    PATH_SUFFIXES "csm" 
			    PATHS $ENV{CONDA_PREFIX}/include/)
  find_library(CSM_LIBRARY csmapi PATHS $ENV{CONDA_PREFIX}/lib)
  
  message("--Found CSM Library: ${CSM_LIBRARY}")
  message("--Found CSM Include Directory: ${CSM_INCLUDE_DIR}")
endif(BUILD_CSM)

add_library(usgscsm SHARED
@@ -42,7 +45,6 @@ target_include_directories(usgscsm
)

# Setup for GoogleTest

find_package (Threads)

target_link_libraries(usgscsm
@@ -50,16 +52,11 @@ target_link_libraries(usgscsm
                      gtest ${CMAKE_THREAD_LIBS_INIT})

if(WIN32)
  option(CMAKE_USE_WIN32_THREADS_INIT "using WIN32 threads" ON)
  option(gtest_disable_pthreads "Disable uses of pthreads in gtest." ON)
  install(TARGETS usgscsm
    RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
    install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  install(TARGETS usgscsm RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
  install(TARGETS usgscsm
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
    install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  install(TARGETS usgscsm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})


# Optional build or link against CSM
Compare ea22180f to c78dbba3
Original line number Diff line number Diff line
Subproject commit ea22180f46f86f4c95ade84ab81eb4477bdd8dd6
Subproject commit c78dbba3731432249a75db9fdd7415b292d46715
Compare e5e2ef7c to 2fe3bd99
Original line number Diff line number Diff line
Subproject commit e5e2ef7cd27cc089c1d8302a11970ef870554294
Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
//
//-----------------------------------------------------------------------------

#define USGSASTROLINESCANNER_LIBRARY
#define USGS_SENSOR_LIBRARY

#include "UsgsAstroLsPlugin.h"
#include "UsgsAstroLsSensorModel.h"
Loading