Skip to content

Commit

Permalink
Fix installable targets in build (flashlight#846)
Browse files Browse the repository at this point in the history
Summary:
Some issues with flashlight#834 to fix flashlight#814 which broke exported installable targets.

Pull Request resolved: flashlight#846

Test Plan: CI

Reviewed By: benoitsteiner

Differential Revision: D35015587

Pulled By: jacobkahn

fbshipit-source-id: 5667005704fbef67ad63efb3208d90ebe1e4f04d
  • Loading branch information
jacobkahn authored and facebook-github-bot committed Mar 21, 2022
1 parent 4c322e4 commit b329a51
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ cmake_dependent_option(FL_BUILD_PROFILING
"FL_USE_CUDA" OFF)

# List of installable targets
list(APPEND INSTALLABLE_TARGETS"")
set(INSTALLABLE_TARGETS)

set(FL_ROOT_DIR ${PROJECT_SOURCE_DIR}/flashlight)
set(FL_BUILD_BINARY_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin")
Expand Down
2 changes: 1 addition & 1 deletion flashlight/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ if (FL_BUILD_ALL_APPS)
endif()
set(FL_APP_BENCHMARK_ROOT_DIR ${FL_APPS_DIR}/benchmark)
include(${FL_APP_BENCHMARK_ROOT_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} flashlight-app-benchmark)
list(APPEND INSTALLABLE_TARGETS flashlight-app-benchmark)
setup_install_headers(${FL_APP_BENCHMARK_ROOT_DIR} ${FL_INSTALL_INC_DIR_HEADER_LOC}/app)
endif()
5 changes: 5 additions & 0 deletions flashlight/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option(
${FL_BUILD_ALL_LIBS})
if(FL_BUILD_LIB_SET)
include(${CMAKE_CURRENT_LIST_DIR}/set/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS fl_lib_set)
endif()

# sequence
Expand All @@ -24,6 +25,7 @@ option(
${FL_BUILD_ALL_LIBS})
if(FL_BUILD_LIB_SEQUENCE)
include(${CMAKE_CURRENT_LIST_DIR}/sequence/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS fl_lib_sequence)
endif()

# audio
Expand All @@ -33,6 +35,7 @@ option(
${FL_BUILD_ALL_LIBS})
if(FL_BUILD_LIB_AUDIO)
include(${CMAKE_CURRENT_LIST_DIR}/audio/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS fl_lib_audio)
endif()

# common
Expand All @@ -42,6 +45,7 @@ option(
${FL_BUILD_ALL_LIBS})
if(FL_BUILD_LIB_COMMON)
include(${CMAKE_CURRENT_LIST_DIR}/common/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS fl_lib_common)
endif()

# text
Expand All @@ -51,4 +55,5 @@ option(
${FL_BUILD_ALL_LIBS})
if(FL_BUILD_LIB_TEXT)
include(${CMAKE_CURRENT_LIST_DIR}/text/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS fl_lib_text)
endif()
2 changes: 0 additions & 2 deletions flashlight/lib/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ add_library(
""
)

list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_lib_audio)

target_include_directories(
fl_lib_audio
PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions flashlight/lib/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ add_library(
""
)

list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_lib_common)

target_include_directories(
fl_lib_common
PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions flashlight/lib/sequence/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ add_library(
""
)

list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_lib_sequence)

target_include_directories(
fl_lib_sequence
PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions flashlight/lib/set/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ add_library(
""
)

list(APPEND INSTALLABLE_TARGETS fl_lib_set)

target_include_directories(
fl_lib_set
PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions flashlight/lib/text/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ add_library(
""
)

list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_lib_text)

target_include_directories(
fl_lib_text
PRIVATE
Expand Down
10 changes: 5 additions & 5 deletions flashlight/pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fl_dependent_option(
if(FL_BUILD_PKG_RUNTIME)
set(FL_PKG_RUNTIME_DIR ${FL_PKG_DIR}/runtime)
include(${FL_PKG_RUNTIME_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_pkg_runtime)
list(APPEND INSTALLABLE_TARGETS fl_pkg_runtime)
setup_install_headers(
${FL_PKG_RUNTIME_DIR}
${FL_INSTALL_INC_DIR_HEADER_LOC}/pkg)
Expand All @@ -34,7 +34,7 @@ fl_dependent_option(
if(FL_BUILD_PKG_VISION)
set(FL_PKG_VISION_DIR ${FL_PKG_DIR}/vision)
include(${FL_PKG_VISION_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_pkg_vision)
list(APPEND INSTALLABLE_TARGETS fl_pkg_vision)
setup_install_headers(
${FL_PKG_VISION_DIR}
${FL_INSTALL_INC_DIR_HEADER_LOC}/pkg)
Expand All @@ -50,7 +50,7 @@ fl_dependent_option(
if(FL_BUILD_PKG_TEXT)
set(FL_PKG_TEXT_DIR ${FL_PKG_DIR}/text)
include(${FL_PKG_TEXT_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_pkg_text)
list(APPEND INSTALLABLE_TARGETS fl_pkg_text)
setup_install_headers(
${FL_PKG_TEXT_DIR}
${FL_INSTALL_INC_DIR_HEADER_LOC}/pkg)
Expand All @@ -67,7 +67,7 @@ fl_dependent_option(
if(FL_BUILD_PKG_SPEECH)
set(FL_PKG_SPEECH_DIR ${FL_PKG_DIR}/speech)
include(${FL_PKG_SPEECH_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_pkg_speech)
list(APPEND INSTALLABLE_TARGETS fl_pkg_speech)
setup_install_headers(
${FL_PKG_SPEECH_DIR}
${FL_INSTALL_INC_DIR_HEADER_LOC}/pkg)
Expand All @@ -83,7 +83,7 @@ fl_dependent_option(
if(FL_BUILD_PKG_HALIDE)
set(FL_PKG_HALIDE_DIR ${FL_PKG_DIR}/halide)
include(${FL_PKG_HALIDE_DIR}/CMakeLists.txt)
list(APPEND INSTALLABLE_TARGETS${INSTALLABLE_TARGETS} fl_pkg_halide)
list(APPEND INSTALLABLE_TARGETS fl_pkg_halide)
setup_install_headers(
${FL_PKG_HALIDE_DIR}
${FL_INSTALL_INC_DIR_HEADER_LOC}/pkg)
Expand Down

0 comments on commit b329a51

Please sign in to comment.