@@ -30,13 +30,6 @@ project(unit_tests
3030 DESCRIPTION "Unit tests for Ledger Nano application"
3131 LANGUAGES C)
3232
33- # Detect strlcpy availability and include fallback if necessary
34- include (CheckFunctionExists)
35- check_function_exists(strlcpy HAVE_STRLCPY)
36- if (NOT HAVE_STRLCPY)
37- add_compile_options (-include libs/fallback_strlcpy.h)
38- endif ()
39-
4033# guard against bad build-type strings
4134if (NOT CMAKE_BUILD_TYPE )
4235 set (CMAKE_BUILD_TYPE "Debug" )
@@ -80,18 +73,25 @@ if(HAVE_LIQUID)
8073 message ("${BoldCyan} ** LIQUID SUPPORT ENABLED **${ColourReset} " )
8174endif ()
8275
76+ # Include directories
8377include_directories (../src)
8478include_directories (../src/common)
8579include_directories (mock_includes)
80+ include_directories (libs)
8681include_directories (lib/sha-2)
8782
83+ # Detect strlcpy availability and include fallback if necessary
84+ include (CheckFunctionExists)
85+ check_function_exists(strlcpy HAVE_STRLCPY)
86+ if (NOT HAVE_STRLCPY)
87+ add_compile_options (-include fallback_strlcpy.h)
88+ endif ()
89+
8890if (CMAKE_C_COMPILER_ID STREQUAL "AppleClang" )
8991 include_directories (/usr/local/include )
9092 link_directories (/usr/local/lib)
9193endif ()
9294
93- include_directories (libs)
94-
9595add_executable (test_apdu_parser test_apdu_parser.c)
9696add_executable (test_base58 test_base58.c)
9797add_executable (test_bip32 test_bip32.c)
0 commit comments