Skip to content

Commit

Permalink
add STATIC_LIB option
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinstoecker committed Oct 17, 2024
1 parent 7e618d7 commit 2c66278
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Intern/rayx-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ file(GLOB_RECURSE ALPAKA_SOURCE
${PROJECT_SOURCE_DIR}/src/Shader/*.cpp
${PROJECT_SOURCE_DIR}/src/Tracer/*.cpp
)
add_library(${PROJECT_NAME} SHARED ${SOURCE})

if(STATIC_LIB STREQUAL "YES")
add_library(${PROJECT_NAME} STATIC ${SOURCE})
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
else()
add_library(${PROJECT_NAME} SHARED ${SOURCE})
endif()

alpaka_target(${PROJECT_NAME})
alpaka_source(${ALPAKA_SOURCE})

Expand Down

0 comments on commit 2c66278

Please sign in to comment.