Skip to content

Commit

Permalink
scot framework full library
Browse files Browse the repository at this point in the history
  • Loading branch information
Alirezalm committed Sep 6, 2023
1 parent e041001 commit c7bdc1e
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ target_link_libraries(${PROJECT_NAME} primal)
target_link_libraries(${PROJECT_NAME} spdlog.a)
target_link_libraries(${PROJECT_NAME} fmt.a)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/scot)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/scot_framework)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
install(TARGETS scot DESTINATION bin)
10 changes: 7 additions & 3 deletions DOSE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ cmake_minimum_required(VERSION 3.22)

file(GLOB DOSE_SRC "src/*.cpp")



add_library(dose SHARED ${DOSE_SRC})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
file(GLOB INC "include/*.h")

install(TARGETS dose DESTINATION lib )

#install(TARGETS addlib DESTINATION lib )
#
#install(FILES add.h DESTINATION include )
install(FILES ${INC} DESTINATION include )
9 changes: 8 additions & 1 deletion src/Algorithm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@ file(GLOB SCOT_ALGORITHMS "*.cpp")
add_library(algorithms SHARED ${SCOT_ALGORITHMS})

target_include_directories(algorithms PRIVATE "${CMAKE_SOURCE_DIR}/DOSE")
target_include_directories(algorithms PRIVATE "${CMAKE_SOURCE_DIR}/ExternLibs/spdlog")
target_include_directories(algorithms PRIVATE "${CMAKE_SOURCE_DIR}/ExternLibs/spdlog")

file(GLOB INC "*.h")

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
install(TARGETS algorithms DESTINATION lib )

install(FILES ${INC} DESTINATION include )
10 changes: 9 additions & 1 deletion src/MIPSolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ target_include_directories(mip PRIVATE
target_link_directories(mip PUBLIC "$ENV{GUROBI_HOME}/lib")

target_link_libraries(mip gurobi_c++)
target_link_libraries(mip gurobi100)
target_link_libraries(mip gurobi100)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

file(GLOB INC "*.h")

install(TARGETS mip DESTINATION lib )

install(FILES ${INC} DESTINATION include )
10 changes: 9 additions & 1 deletion src/Model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ target_include_directories(model PRIVATE
"${CMAKE_SOURCE_DIR}/DOSE"
"$ENV{GUROBI_HOME}/include"
"${CMAKE_SOURCE_DIR}/ExternLibs/spdlog"
)
)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

file(GLOB INC "*.h")

install(TARGETS model DESTINATION lib )

install(FILES ${INC} DESTINATION include )
10 changes: 9 additions & 1 deletion src/PrimalSolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ add_library(primal SHARED ${SCOT_PRIMAL})

target_include_directories(primal PRIVATE
"${CMAKE_SOURCE_DIR}/DOSE"
)
)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

file(GLOB INC "*.h")

install(TARGETS primal DESTINATION lib )

install(FILES ${INC} DESTINATION include )
8 changes: 7 additions & 1 deletion src/Solver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ target_link_directories(solver PUBLIC
"${CMAKE_SOURCE_DIR}/Algorithms")

target_link_libraries(solver PUBLIC tasks)
target_link_libraries(solver PUBLIC algorithms)
target_link_libraries(solver PUBLIC algorithms)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
file(GLOB INC "*.h")

install(TARGETS solver DESTINATION lib )

install(FILES ${INC} DESTINATION include )
10 changes: 9 additions & 1 deletion src/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ target_include_directories(tasks PRIVATE

target_link_directories(tasks PUBLIC "${CMAKE_SOURCE_DIR}/MIPSolver")

target_link_libraries(tasks PUBLIC mip)
target_link_libraries(tasks PUBLIC mip)

file(GLOB INC "*.h")

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

install(TARGETS tasks DESTINATION lib )

install(FILES ${INC} DESTINATION include )

0 comments on commit c7bdc1e

Please sign in to comment.