Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TARGET_LINKER_FILE/TARGET_LINKER_FILE_NAME with SpoutLibrary #97

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions SPOUTSDK/SpoutLibrary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@ target_compile_definitions(SpoutLibrary
SPOUT_BUILD_DLL
)

get_property(GeneratorisMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GeneratorisMultiConfig)
set(ConfigOutputDirectory $<CONFIG>/)
endif()

# Win32 or x64 build
if(CMAKE_SIZEOF_VOID_P EQUAL 4)

# Copy Win32 binaries to the BUILD/Binaries folder
add_custom_command(TARGET SpoutLibrary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_BINARY_DIR}/${ConfigOutputDirectory}SpoutLibrary.lib ${CMAKE_BINARY_DIR}/Binaries/Win32/SpoutLibrary.lib
copy $<TARGET_LINKER_FILE:SpoutLibrary> ${CMAKE_BINARY_DIR}/Binaries/Win32/$<TARGET_LINKER_FILE_NAME:SpoutLibrary>
)
add_custom_command(TARGET SpoutLibrary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
Expand All @@ -47,7 +42,7 @@ else()
# Copy x64 binaries to the BUILD/Binaries folder
add_custom_command(TARGET SpoutLibrary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_BINARY_DIR}/${ConfigOutputDirectory}SpoutLibrary.lib ${CMAKE_BINARY_DIR}/Binaries/x64/SpoutLibrary.lib
copy $<TARGET_LINKER_FILE:SpoutLibrary> ${CMAKE_BINARY_DIR}/Binaries/x64/$<TARGET_LINKER_FILE_NAME:SpoutLibrary>
)
add_custom_command(TARGET SpoutLibrary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
Expand Down