From 5453e6d567a3a9988c5774f8caa580607b279d6d Mon Sep 17 00:00:00 2001 From: Dylan <2894220@gmail.com> Date: Sat, 12 Oct 2024 14:06:37 +0800 Subject: [PATCH] feat: build Release successfully Signed-off-by: Dylan <2894220@gmail.com> --- .gitignore | 2 +- CMakeLists.txt | 5 +++++ conanfile.py | 4 ++-- nim_win_demo/CMakeLists.txt | 9 --------- tool_kits/cef/cef_render/CMakeLists.txt | 3 --- tool_kits/cef/cef_render/main.cpp | 1 + 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index f7f4e92f..40d08bbd 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ [Oo]bj/ [Ll]og/ build/ -bin/ +bin/*.* # Visual Studio 2015/2017 cache/options directory .vs/ diff --git a/CMakeLists.txt b/CMakeLists.txt index b2738ed6..6ef65d3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,11 @@ else () add_definitions(-DSUPPORTLOCALPLAYER) endif () +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin") +set(CMAKE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/pdb") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin") +set(CMAKE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/pdb") + set(CMAKE_INCLUDE_CURRENT_DIR ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "cmake") diff --git a/conanfile.py b/conanfile.py index e28c7293..ac997567 100644 --- a/conanfile.py +++ b/conanfile.py @@ -33,7 +33,7 @@ def requirements(self): self.requires("tinyxml/2.6.2") self.requires("nim/10.5.0-beta.2@yunxin/testing") self.requires("nertc/4.1.1@yunxin/stable") - self.requires("cef/2623@yunxin/stable") + self.requires("libcef/3.2623.1401@yunxin/stable") self.requires("ne_live_player/1.1.1@yunxin/stable") self.requires("image_ole/4.2.0@yunxin/stable") self.requires("ne_transfer/0.1.0@yunxin/stable") @@ -41,7 +41,7 @@ def requirements(self): def imports(self): script_path = os.path.split(os.path.realpath(__file__))[0] binary_path = os.path.join(script_path, "bin") - self.copy("*.*", binary_path, "bin", "cef") + self.copy("*.*", binary_path, "bin", "libcef") self.copy("*.*", binary_path, "bin", "nim") self.copy("*.*", binary_path, "bin", "nertc") self.copy("*.*", binary_path, "bin", "ne_live_player") diff --git a/nim_win_demo/CMakeLists.txt b/nim_win_demo/CMakeLists.txt index 170b4ec4..43e07ee1 100644 --- a/nim_win_demo/CMakeLists.txt +++ b/nim_win_demo/CMakeLists.txt @@ -1,8 +1,5 @@ project(nim_demo DESCRIPTION "NetEase IM Demo") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin") - add_definitions( -DWITH_ENCRYPT ) @@ -70,12 +67,6 @@ target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS} ) -if (CMAKE_BUILD_TYPE MATCHES "Release") - target_link_libraries(${PROJECT_NAME} nim_libcef) -else () - target_link_libraries(${PROJECT_NAME} nim_libcef_d) -endif () - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /DELAYLOAD:nim_libcef.dll /DELAYLOAD:NELivePlayer.dll" diff --git a/tool_kits/cef/cef_render/CMakeLists.txt b/tool_kits/cef/cef_render/CMakeLists.txt index 20316dd8..db9141dc 100644 --- a/tool_kits/cef/cef_render/CMakeLists.txt +++ b/tool_kits/cef/cef_render/CMakeLists.txt @@ -2,9 +2,6 @@ SET(TARGET_NAME render) PROJECT(${TARGET_NAME} DESCRIPTION "NetEase IM Demo CEF Render Process") -SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin") -SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin") - INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_LIST_DIR}/../ ${CMAKE_CURRENT_LIST_DIR}/../../ diff --git a/tool_kits/cef/cef_render/main.cpp b/tool_kits/cef/cef_render/main.cpp index d94025db..2a515bae 100644 --- a/tool_kits/cef/cef_render/main.cpp +++ b/tool_kits/cef/cef_render/main.cpp @@ -1,5 +1,6 @@ #include "include/cef_client.h" #include "app/client_app.h" +#include int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR lpszCmdLine, int nCmdShow) {