*/}}
Browse Source

fixed some linker issue

YimingWu 10 months ago
parent
commit
5f865d46cf
2 changed files with 18 additions and 2 deletions
  1. 18 0
      CMakeLists.txt
  2. 0 2
      nvgtest.c

+ 18 - 0
CMakeLists.txt

@@ -4,6 +4,8 @@ project(demo)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
 
 
 find_package(lagui REQUIRED)
 find_package(lagui REQUIRED)
+find_package(PNG REQUIRED)
+find_package(LuaJIT)
 
 
 add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
 add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
 add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
 add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
@@ -63,6 +65,22 @@ endif()
 
 
 target_link_libraries(example_viewer ${LAGUI_SHARED_LIBS} )
 target_link_libraries(example_viewer ${LAGUI_SHARED_LIBS} )
 
 
+
+message("${LAGUI_SHARED_LIBS}")
+
+target_link_options(simplest PUBLIC "-Wl,--start-group")
+target_link_options(operator PUBLIC "-Wl,--start-group")
+target_link_options(simple_properties PUBLIC "-Wl,--start-group")
+target_link_options(widgets PUBLIC "-Wl,--start-group")
+target_link_options(widget_flags PUBLIC "-Wl,--start-group")
+target_link_options(fruits PUBLIC "-Wl,--start-group")
+target_link_options(modelling_main PUBLIC "-Wl,--start-group")
+target_link_options(calculator PUBLIC "-Wl,--start-group")
+target_link_options(nvgtest PUBLIC "-Wl,--start-group")
+target_link_options(luajit PUBLIC "-Wl,--start-group")
+target_link_options(example_viewer PUBLIC "-Wl,--start-group")
+
+
 get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
 get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
 if(GENERATOR_IS_MULTI_CONFIG)
 if(GENERATOR_IS_MULTI_CONFIG)
 set(INSTALL_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
 set(INSTALL_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)

+ 0 - 2
nvgtest.c

@@ -16,8 +16,6 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 */
 
 
-#define NANOVG_GL3_IMPLEMENTATION
-
 #include "la_5.h"
 #include "la_5.h"
 extern LA MAIN;
 extern LA MAIN;
 extern tnsMain* T;
 extern tnsMain* T;