Skip to content

Commit

Permalink
Merge pull request #48 from geoschem/feature/fixed-install
Browse files Browse the repository at this point in the history
Fixed make install
  • Loading branch information
lizziel committed Oct 19, 2020
2 parents 5a32d3b + 355c4c6 commit db9551e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Expand Up @@ -11,11 +11,9 @@ list(APPEND CMAKE_MODULE_PATH
)

# Run directory
set(RUNDIR ${CMAKE_BINARY_DIR}/.. CACHE PATH "Path to GCHPctm run directory")
if(RUNDIR)
set(CMAKE_INSTALL_PREFIX ${RUNDIR} CACHE PATH "Install prefix for GCHPctm" FORCE)
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)
endif()
set(RUNDIR "" CACHE PATH "Path(s) to run directory (semicolon separated list). Specifies install locations for geos")
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Fake CMAKE_INSTALL_PREFIX (use RUNDIR instead)" FORCE)
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)

# Find nc-config and nf-config
find_program(NC_CONFIG NAMES "nc-config" DOC "Location of nc-config utility")
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -37,4 +37,6 @@ target_link_libraries(geos
)
set_target_properties(geos PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
install(TARGETS geos RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
foreach(RUNDIR_PATH ${RUNDIR})
install(TARGETS geos RUNTIME DESTINATION ${RUNDIR_PATH})
endforeach()

0 comments on commit db9551e

Please sign in to comment.