Skip to content

Commit

Permalink
build: ensure external libs are built before binary under CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Sep 12, 2024
1 parent b7b5f26 commit 0517291
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ add_subdirectory(external/floppybridge)
add_subdirectory(external/capsimage)
add_subdirectory(external/libguisan)

# Add dependencies to ensure external libraries are built
add_dependencies(${PROJECT_NAME} mt32emu floppybridge capsimage guisan)

target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS} src src/osdep src/include src/threaddep src/archivers external/libguisan/include external/mt32emu/src external/floppybridge/src)
target_link_libraries(${PROJECT_NAME} PRIVATE SDL2 SDL2_image SDL2_ttf guisan mt32emu ${DBUS_LIBRARIES} FLAC portmidi png mpg123 mpeg2convert mpeg2 serialport z)
target_link_options(${PROJECT_NAME} PRIVATE "LINKER:-as-needed,-no-pie")
Expand Down

0 comments on commit 0517291

Please sign in to comment.