Skip to content

Commit

Permalink
Merge pull request #43 from pedrolcl/devel
Browse files Browse the repository at this point in the history
fix for issue #42: new cmake option for PIC
  • Loading branch information
divideconcept authored Oct 15, 2022
2 parents 7db7cb8 + 6162526 commit 7c150b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include(GNUInstallDirs)
option(ENABLE_SF3 "Enable SF3 files (ogg/vorbis compressed samples)" FALSE)
option(STB_VORBIS "Use STB VORBIS library instead of ogg/vorbis" FALSE)
option(WITH_FLOAT "Use 32 bit float type samples (instead of 64 bit double type)" TRUE)
option(CMAKE_POSITION_INDEPENDENT_CODE "Use PIC for building all sources" TRUE)

string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_BUILD_TYPE)
if("${LOWERCASE_BUILD_TYPE}" STREQUAL "debug")
Expand Down Expand Up @@ -195,7 +196,6 @@ endif()

option(FLUIDLITE_BUILD_SHARED "Build shared library" TRUE)
if(FLUIDLITE_BUILD_SHARED)
set_target_properties(${PROJECT_NAME}-obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(${PROJECT_NAME} SHARED $<TARGET_OBJECTS:${PROJECT_NAME}-obj>)
target_link_libraries(${PROJECT_NAME} PRIVATE
${LIBVORBIS_LIBRARIES}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,5 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
${MATH_LIB}
)
~~~

Warning! this repository contains symlinks. If you are a Windows user and this is new for you, please [learn about this feature in Windows](https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/) and [git for windows](https://github.com/orgs/community/discussions/23591).
8 changes: 6 additions & 2 deletions aliases.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# The exported targets as aliases, to use FluidLite in another project
# for instance as a git submodule
add_library(fluidlite::fluidlite ALIAS fluidlite)
add_library(fluidlite::fluidlite-static ALIAS fluidlite-static)
if (TARGET fluidlite)
add_library(fluidlite::fluidlite ALIAS fluidlite)
endif()
if (TARGET fluidlite-static)
add_library(fluidlite::fluidlite-static ALIAS fluidlite-static)
endif()

0 comments on commit 7c150b0

Please sign in to comment.