Skip to content

Commit

Permalink
Fix generator expressions showing up in pkgconfig files
Browse files Browse the repository at this point in the history
Instead of using these expressions, adding "lib" in fron of static libs is now done via CMAKE_STATIC_LIBRARY_PREFIX when building static libs on Windows.
  • Loading branch information
kblaschke committed Nov 26, 2023
1 parent 1e0f8c6 commit 9b03314
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ else()
)
endif()

if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Add "lib" in front of static library files to allow installing both shared and static libs in the same dir.
set(CMAKE_STATIC_LIBRARY_PREFIX lib)
endif()

if(ENABLE_EMSCRIPTEN)
message(STATUS "${CMAKE_C_COMPILER} on ${CMAKE_SYSTEM_NAME}")
check_symbol_exists(__EMSCRIPTEN__ "" HAVE_EMSCRIPTEN)
Expand Down
2 changes: 1 addition & 1 deletion src/libprojectM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ else()
)

set_target_properties(projectM PROPERTIES
OUTPUT_NAME $<IF:$<PLATFORM_ID:Windows>,lib${PROJECTM_LIBRARY_BASE_OUTPUT_NAME},${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}>
OUTPUT_NAME ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}
FOLDER libprojectM
)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/playlist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else()
)

set_target_properties(projectM_playlist PROPERTIES
OUTPUT_NAME $<IF:$<PLATFORM_ID:Windows>,lib${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist,${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist>
OUTPUT_NAME ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist
FOLDER libprojectM
)
endif()
Expand Down

0 comments on commit 9b03314

Please sign in to comment.