Skip to content

Commit

Permalink
[cmake] Add library version and compile lib with fPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Sep 19, 2024
1 parent 3293575 commit add92e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ target_compile_features(nrgljubljana_c PUBLIC cxx_std_20)
# Enable warnings
target_link_libraries(nrgljubljana_c PRIVATE project_warnings)

# Set library version and PIC flag
set_target_properties(nrgljubljana_c PROPERTIES
POSITION_INDEPENDENT_CODE ON
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)

option(GPROF "Enable profiling using gprof" OFF)

# Configure compilation
Expand Down

0 comments on commit add92e9

Please sign in to comment.