Skip to content

Commit

Permalink
adding solarpilot and copilot cmake build flags
Browse files Browse the repository at this point in the history
  • Loading branch information
qualand committed Mar 7, 2024
1 parent 0f66210 commit 70bfd8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if ( NOT APPLE)
set(CURL_DIR build_resources/libcurl_ssl_x64)
endif()

if (NOT SP_STANDALONE)
if (NOT (BUILD_SOLARPILOT OR BUILD_COPILOT_API))
Project(sam_simulation_core VERSION 1.0.0)
endif()

Expand Down Expand Up @@ -141,19 +141,20 @@ endfunction()
#
#####################################################################################################################

if (SP_STANDALONE)
if (BUILD_SOLARPILOT OR BUILD_COPILOT_API)
Project(solarpilot_codelibs)
endif()

if(NOT COPILOT_API)
if(NOT BUILD_COPILOT_API)
add_subdirectory(splinter)
endif()

add_subdirectory(shared)
add_subdirectory(solarpilot)
add_subdirectory(nlopt)
add_subdirectory(lpsolve)

if (NOT SP_STANDALONE)
if (NOT (BUILD_SOLARPILOT OR BUILD_COPILOT_API))
add_subdirectory(tcs)
add_subdirectory(ssc)
endif()
Expand Down
4 changes: 2 additions & 2 deletions solarpilot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ endif()



if(NOT COPILOT_API)
if(NOT BUILD_COPILOT_API)
add_library(solarpilot_core STATIC ${SOLARPILOT_SRC})
set_target_properties(solarpilot_core
PROPERTIES
Expand Down Expand Up @@ -120,7 +120,7 @@ else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:LINUX")
endif()

if(COPILOT_API)
if(BUILD_COPILOT_API)
target_link_libraries(solarpilot lpsolve nlopt shared coretrace)
if (MSVC)
set(COPILOT_DLL $<TARGET_FILE_DIR:solarpilot>/$<TARGET_FILE_BASE_NAME:solarpilot>.dll)
Expand Down

0 comments on commit 70bfd8e

Please sign in to comment.