Skip to content

Commit

Permalink
clean up CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed Oct 16, 2024
1 parent 8e8c06f commit 468dcde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,11 @@ if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12" CACHE STRING "Minimum OS X deployment version")
endif()

if (UNIX AND NOT CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)
endif()
set(CMAKE_CXX_STANDARD 11)

if ( NOT APPLE)
set(CURL_DIR build_resources/libcurl_ssl_x64)
endif()

Project(sam_simulation_core VERSION 1.0.0)
Project(sam_simulation_core VERSION 1.0.0 LANGUAGES CXX C)


#####################################################################################################################
Expand Down
9 changes: 7 additions & 2 deletions ssc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,16 @@ set( DEPENDENCIES
splinter
)
foreach( name ${DEPENDENCIES} )
target_link_libraries(ssc ${name})
target_link_libraries(ssc PUBLIC ${name})
endforeach()

if (UNIX)
target_link_libraries(ssc -lpthread -lm -ldl -lstdc++)
find_package(Threads REQUIRED)
target_link_libraries(ssc PUBLIC Threads::Threads ${CMAKE_DL_LIBS})
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
target_link_libraries(ssc PUBLIC ${MATH_LIBRARY})
endif()
endif()


Expand Down

0 comments on commit 468dcde

Please sign in to comment.