forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: Use target_link_libraries directly in cmake.
Instead of using `target_link_modules`, which does magic that we no longer need, because we only have 1 library we install, and all binaries we build link statically because they need access to internal symbols.
- Loading branch information
Showing
7 changed files
with
68 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1550b285e7d2f85a340fbde449dfbab3d49958794c918aebdb486ffc1b77c68c /usr/local/bin/tox-bootstrapd | ||
f0bff9fe04d56543d95a457afd76c618139eef99a4302337c66d07759d108e8b /usr/local/bin/tox-bootstrapd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,41 @@ | ||
function target_link_toxcore(target) | ||
if(TARGET toxcore_static) | ||
target_link_libraries(${target} PRIVATE toxcore_static) | ||
else() | ||
target_link_libraries(${target} PRIVATE toxcore_shared) | ||
endif() | ||
endfunction() | ||
|
||
add_executable(save-generator save-generator.c) | ||
target_link_modules(save-generator toxcore misc_tools) | ||
target_link_libraries(save-generator PRIVATE misc_tools) | ||
target_link_toxcore(save-generator) | ||
|
||
add_executable(strkey strkey.c) | ||
target_link_modules(strkey toxcore ${LIBSODIUM_LIBRARIES}) | ||
target_link_libraries(strkey PRIVATE ${LIBSODIUM_LIBRARIES}) | ||
target_link_toxcore(strkey) | ||
|
||
add_executable(create_bootstrap_keys create_bootstrap_keys.c) | ||
target_link_modules(create_bootstrap_keys ${LIBSODIUM_LIBRARIES}) | ||
target_link_libraries(create_bootstrap_keys PRIVATE ${LIBSODIUM_LIBRARIES}) | ||
target_link_toxcore(create_bootstrap_keys) | ||
|
||
add_executable(create_minimal_savedata create_minimal_savedata.c) | ||
target_link_modules(create_minimal_savedata ${LIBSODIUM_LIBRARIES}) | ||
target_link_libraries(create_minimal_savedata PRIVATE ${LIBSODIUM_LIBRARIES}) | ||
|
||
add_executable(create_savedata create_savedata.c) | ||
target_link_modules(create_savedata toxcore ${LIBSODIUM_LIBRARIES}) | ||
target_link_libraries(create_savedata PRIVATE ${LIBSODIUM_LIBRARIES}) | ||
target_link_toxcore(create_savedata) | ||
|
||
add_executable(sign sign.c) | ||
target_link_modules(sign ${LIBSODIUM_LIBRARIES} misc_tools) | ||
target_link_libraries(sign PRIVATE ${LIBSODIUM_LIBRARIES} misc_tools) | ||
|
||
add_executable(cracker_simple cracker_simple.c) | ||
target_link_modules(cracker_simple ${LIBSODIUM_LIBRARIES} misc_tools) | ||
target_link_libraries(cracker_simple ${LIBSODIUM_LIBRARIES} misc_tools) | ||
|
||
# MSVC doesn't support OpenMP | ||
if(NOT MSVC) | ||
find_package(OpenMP) | ||
if(OpenMP_C_FOUND) | ||
add_executable(cracker cracker.c) | ||
target_link_modules(cracker ${LIBSODIUM_LIBRARIES}) | ||
target_link_libraries(cracker PRIVATE OpenMP::OpenMP_C) | ||
target_link_libraries(cracker PRIVATE OpenMP::OpenMP_C ${LIBSODIUM_LIBRARIES}) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters