Commit 457777b08c4c876b1f51dfd5467c84df372ecc4e
1 parent
503c3ff5
Better stasm inclusion/compilation
Showing
2 changed files
with
6 additions
and
17 deletions
openbr/plugins/cmake/stasm4.cmake
| ... | ... | @@ -2,14 +2,7 @@ set(BR_WITH_STASM4 ON CACHE BOOL "Build with Stasm") |
| 2 | 2 | |
| 3 | 3 | if(${BR_WITH_STASM4}) |
| 4 | 4 | find_package(Stasm4 REQUIRED) |
| 5 | - set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Stasm4_LIBS}) | |
| 6 | - | |
| 7 | - if(WIN32) | |
| 8 | - install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION bin) | |
| 9 | - else() | |
| 10 | - install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION lib) | |
| 11 | - endif() | |
| 12 | - | |
| 5 | + set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${Stasm_SRC}) | |
| 13 | 6 | install(DIRECTORY ${Stasm_DIR}/data/ DESTINATION share/openbr/models/stasm) |
| 14 | 7 | else() |
| 15 | 8 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/metadata/stasm4.cpp) | ... | ... |
share/openbr/cmake/FindStasm4.cmake
| ... | ... | @@ -8,13 +8,9 @@ |
| 8 | 8 | # target_link_libraries(MY_TARGET ${Stasm4_LIBS}) |
| 9 | 9 | # ================================================================ |
| 10 | 10 | |
| 11 | -find_path(Stasm_DIR stasm/stasm_lib.h ${CMAKE_SOURCE_DIR}/3rdparty/*) | |
| 12 | - | |
| 13 | -add_subdirectory(${Stasm_DIR} ${Stasm_DIR}/build) | |
| 14 | - | |
| 15 | -set(SRC ${SOURCE};${SRC}) | |
| 16 | - | |
| 11 | +find_path(Stasm_DIR stasm/stasm_lib.h ${CMAKE_SOURCE_DIR}/3rdparty/* NO_DEFAULT_PATH) | |
| 12 | +mark_as_advanced(Stasm_DIR) | |
| 17 | 13 | include_directories(${Stasm_DIR}/stasm) |
| 18 | -link_directories(${Stasm_DIR}/build) | |
| 19 | - | |
| 20 | -set(Stasm4_LIBS stasm) | |
| 14 | +include_directories(${Stasm_DIR}/stasm/MOD_1) | |
| 15 | +file(GLOB Stasm_SRC "${Stasm_DIR}/stasm/*.cpp") | |
| 16 | +file(GLOB Stasm_SRC ${Stasm_SRC} "${Stasm_DIR}/stasm/MOD_1/*.cpp") | ... | ... |