diff --git a/imnodes_dll/CMakeLists.txt b/imnodes_dll/CMakeLists.txt index 0fa4ce8..e9cfc5a 100644 --- a/imnodes_dll/CMakeLists.txt +++ b/imnodes_dll/CMakeLists.txt @@ -8,11 +8,11 @@ target_sources(ImNodes PUBLIC "${CMAKE_CURRENT_LIST_DIR}/ImNodesCAPI.h") target_sources(ImNodes PRIVATE "${CMAKE_CURRENT_LIST_DIR}/ImNodesCAPI.cpp") include_directories( ${CMAKE_CURRENT_LIST_DIR}/../imgui_dll/cimgui/imgui ) -target_link_directories(ImNodes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../lib) - if (APPLE) - target_link_libraries(ImNodes imgui.${CMAKE_OSX_ARCHITECTURES}) + target_link_directories(ImNodes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../imgui_dll/build_${CMAKE_OSX_ARCHITECTURES}) + target_link_libraries(ImNodes imgui) elseif(UNIX) + target_link_directories(ImNodes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../imgui_dll/build) if (DEFINED CROSS_BUILD_PLATFORM) target_link_libraries(ImNodes imgui.${CROSS_BUILD_PLATFORM}) else() @@ -22,6 +22,7 @@ else() # add_library(imgui SHARED IMPORTED) # set_target_properties(imgui PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../imgui_dll/build) # set_target_properties(imgui PROPERTIES IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../imgui_dll/build/libimgui.dll) + target_link_directories(ImNodes PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../imgui_dll/build) target_link_libraries(ImNodes imgui) endif() diff --git a/imnodes_dll/build_imnodes_linux.sh b/imnodes_dll/build_imnodes_linux.sh index 894ed5d..684ebd4 100755 --- a/imnodes_dll/build_imnodes_linux.sh +++ b/imnodes_dll/build_imnodes_linux.sh @@ -3,5 +3,4 @@ cd build cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D CMAKE_CXX_COMPILER=clang++ ../ make arch=`uname -m` -mv imnodes.so imnodes.${arch}.so -cp *.so ../../lib +cp imnodes.so ../../lib/imnodes.${arch}.so diff --git a/imnodes_dll/build_imnodes_linux_cross.sh b/imnodes_dll/build_imnodes_linux_cross.sh index c6a224f..4956a07 100755 --- a/imnodes_dll/build_imnodes_linux_cross.sh +++ b/imnodes_dll/build_imnodes_linux_cross.sh @@ -6,5 +6,4 @@ export ARCH=aarch64 cmake -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON -D CMAKE_CXX_FLAGS=-isystem\ /usr/aarch64-linux-gnu/include -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu -D CMAKE_SYSTEM_PROCESSOR=ARM -D BUILD_SHARED_LIBS=ON -D CROSS_BUILD_PLATFORM=${ARCH} -D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ ../ make -mv imnodes.so imnodes.${ARCH}.so -cp *.so ../../lib +cp imnodes.so ../../lib/imnodes.${ARCH}.so