Skip to content

Commit

Permalink
use target_link_options
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossmaxx committed May 22, 2024
1 parent ad3a21b commit fb7831d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/BuildPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)

IF(LMMS_BUILD_APPLE)
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
TARGET_LINK_OPTIONS(${PLUGIN_NAME} PUBLIC "-undefined dynamic_lookup")
ENDIF()
ENDIF(LMMS_BUILD_APPLE)
IF(LMMS_BUILD_WIN32)
Expand Down
5 changes: 1 addition & 4 deletions plugins/VstBase/RemoteVstPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ target_compile_definitions(${EXE_NAME} PRIVATE BUILD_REMOTE_PLUGIN_CLIENT)

# Workaround for missing WinMain
if(MSVC)
set_property(TARGET ${EXE_NAME}
APPEND
PROPERTY LINK_FLAGS "/entry:mainCRTStartup"
)
target_link_options(${EXE_NAME} INTERFACE "/entry:mainCRTStartup")
endif()

if(IS_MINGW)
Expand Down
4 changes: 2 additions & 2 deletions plugins/ZynAddSubFx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT "RemoteZynAddSubFx")
TARGET_COMPILE_DEFINITIONS(RemoteZynAddSubFx PRIVATE BUILD_REMOTE_PLUGIN_CLIENT)

IF(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(RemoteZynAddSubFx PROPERTIES LINK_FLAGS "${LINK_FLAGS} -mwindows")
ENDIF(LMMS_BUILD_WIN32)
target_link_options(RemoteZynAddSubFx PUBLIC "-mwindows")
ENDIF()

# Remove useless dependencies from FLTK. Use fltk-config to avoid static library
# in older environments
Expand Down

0 comments on commit fb7831d

Please sign in to comment.