Skip to content

Commit d156eaa

Browse files
committed
Move library install handling into Provide*.cmake files
1 parent 194ddf7 commit d156eaa

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,6 @@ else()
334334
install(TARGETS supertux2 DESTINATION ${INSTALL_SUBDIR_BIN})
335335
endif()
336336

337-
if(WIN32)
338-
get_property(SQUIRREL_LIB_PATH TARGET squirrel::squirrel PROPERTY IMPORTED_LOCATION)
339-
get_property(SQSTDLIB_LIB_PATH TARGET squirrel::sqstdlib PROPERTY IMPORTED_LOCATION)
340-
install(FILES ${SQUIRREL_LIB_PATH} ${SQSTDLIB_LIB_PATH} DESTINATION ${INSTALL_SUBDIR_BIN})
341-
342-
get_property(PHYSFS_LIB_PATH TARGET physfs PROPERTY IMPORTED_LOCATION)
343-
install(FILES ${PHYSFS_LIB_PATH} DESTINATION ${INSTALL_SUBDIR_BIN})
344-
endif()
345-
346337
if(EMSCRIPTEN)
347338
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mk/emscripten/template.html.in ${CMAKE_CURRENT_BINARY_DIR}/template.html)
348339
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mk/emscripten/supertux2.png ${CMAKE_CURRENT_BINARY_DIR}/supertux2.png COPYONLY)

mk/cmake/SuperTux/ProvidePhysfs.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ else()
6969
endif()
7070

7171
add_dependencies(LibPhysfs physfs_project)
72+
73+
if(WIN32)
74+
get_property(PHYSFS_LIB_PATH TARGET LibPhysfs PROPERTY IMPORTED_LOCATION)
75+
install(FILES ${PHYSFS_LIB_PATH} DESTINATION "${INSTALL_SUBDIR_BIN}")
76+
endif()
7277
endif()
7378

7479
mark_as_advanced(

mk/cmake/SuperTux/ProvideSquirrel.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ else()
7272

7373
add_dependencies(LibSquirrel squirrel_project)
7474
add_dependencies(LibSqstdlib squirrel_project)
75+
76+
if(WIN32)
77+
get_property(SQUIRREL_LIB_PATH TARGET LibSquirrel PROPERTY IMPORTED_LOCATION)
78+
get_property(SQSTDLIB_LIB_PATH TARGET LibSqstdlib PROPERTY IMPORTED_LOCATION)
79+
install(FILES ${SQUIRREL_LIB_PATH} ${SQSTDLIB_LIB_PATH} DESTINATION "${INSTALL_SUBDIR_BIN}")
80+
endif()
7581
endif()
7682

7783
# EOF #

0 commit comments

Comments
 (0)