Prechádzať zdrojové kódy

cmake:structure change of library dependence

Johannes Ruehle 11 rokov pred
rodič
commit
14ee48b00b
2 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 4 1
      cmake/NiceModules.cmake
  2. 1 1
      core/CMakeLists.txt

+ 4 - 1
cmake/NiceModules.cmake

@@ -22,9 +22,12 @@ endmacro()
 
 
 macro(nice_build_library)
 macro(nice_build_library)
   ADD_LIBRARY("nice_${the_library}" ${NICE_BUILD_LIBS_STATIC_SHARED} ${nice_${the_library}_HDR} ${nice_${the_library}_SRC})
   ADD_LIBRARY("nice_${the_library}" ${NICE_BUILD_LIBS_STATIC_SHARED} ${nice_${the_library}_HDR} ${nice_${the_library}_SRC})
-  TARGET_LINK_LIBRARIES("nice_${the_library}" ${nice_${the_library}_LINKING_DEPENDENCIES} ${Boost_LIBRARIES} ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${QT_LIBRARIES})
+  TARGET_LINK_LIBRARIES("nice_${the_library}" ${nice_${the_library}_LINKING_DEPENDENCIES})
+  #TARGET_LINK_LIBRARIES("nice_${the_library}" ${nice_${the_library}_LINKING_DEPENDENCIES} ${Boost_LIBRARIES} ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${QT_LIBRARIES})
   SET_PROPERTY(TARGET "nice_${the_library}" PROPERTY FOLDER "library")
   SET_PROPERTY(TARGET "nice_${the_library}" PROPERTY FOLDER "library")
   INSTALL(TARGETS "nice_${the_library}" DESTINATION lib)
   INSTALL(TARGETS "nice_${the_library}" DESTINATION lib)
+
+  configure_file( ../cmake/niceConfig.cmake.in "${PROJECT_BINARY_DIR}/lib/nice_${the_library}Config.cmake" )
 endmacro()
 endmacro()
 
 
 
 

+ 1 - 1
core/CMakeLists.txt

@@ -14,7 +14,7 @@ include( progfiles.cmake)
 include( testfiles.cmake)	
 include( testfiles.cmake)	
 
 
 #add linkage dependencies to other libraries here
 #add linkage dependencies to other libraries here
-set("nice_${the_library}_LINKING_DEPENDENCIES" "")
+set("nice_${the_library}_LINKING_DEPENDENCIES"  ${Boost_LIBRARIES} ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${QT_LIBRARIES})
 if(MATIO_FOUND)
 if(MATIO_FOUND)
   list(APPEND nice_${the_library}_LINKING_DEPENDENCIES ${MATIO_LIBRARIES})
   list(APPEND nice_${the_library}_LINKING_DEPENDENCIES ${MATIO_LIBRARIES})
 endif(MATIO_FOUND)
 endif(MATIO_FOUND)