]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
target_link_libraries
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 20 Feb 2016 06:32:51 +0000 (17:32 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 20 Feb 2016 07:02:25 +0000 (18:02 +1100)
22 files changed:
CMakeLists.txt
appveyor.yml
contrib/bobtoolz/CMakeLists.txt
contrib/brushexport/CMakeLists.txt
contrib/prtview/CMakeLists.txt
contrib/shaderplug/CMakeLists.txt
contrib/sunplug/CMakeLists.txt
contrib/ufoaiplug/CMakeLists.txt
libs/CMakeLists.txt
libs/gtkutil/CMakeLists.txt
libs/l_net/CMakeLists.txt
libs/os/CMakeLists.txt
libs/uilib/CMakeLists.txt
libs/xml/CMakeLists.txt
plugins/archivezip/CMakeLists.txt
plugins/image/CMakeLists.txt
plugins/imagepng/CMakeLists.txt
plugins/mapxml/CMakeLists.txt
plugins/model/CMakeLists.txt
plugins/shaders/CMakeLists.txt
plugins/vfspk3/CMakeLists.txt
radiant/CMakeLists.txt

index 59ea517e83175aae2b5302e308ab43909b1e2c80..bed416a5d4d9db0382b896d22d02b4232637d8fd 100644 (file)
@@ -34,6 +34,9 @@ endif ()
 
 configure_file("${CMAKE_SOURCE_DIR}/include/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
 
+add_library(version "${CMAKE_BINARY_DIR}/version.cpp")
+set_property(TARGET version PROPERTY POSITION_INDEPENDENT_CODE TRUE)
+
 set(RADIANT_ABOUTMSG "Custom build" CACHE STRING "About message")
 message(STATUS "Building ${PROJECT_NAME} ${RADIANT_VERSION_STRING} ${RADIANT_ABOUTMSG}")
 
index dab50ed2c8ab95bcea011c5410a432b271031fa4..d456c6963cd65904e9987a1f0f94f150b46d828a 100644 (file)
@@ -24,5 +24,5 @@ build_script:
         mkdir build && cd build
         cmake --version
         cmake -G 'MSYS Makefiles' .. -DGTK2_GLIBCONFIG_INCLUDE_DIR=/mingw64/lib/glib-2.0/include -DGTK2_GDKCONFIG_INCLUDE_DIR=/mingw64/lib/gtk-2.0/include
-        cmake --build . --target radiant
+        cmake --build .
       "@
index b47fdd87a0f2170624fd7db457c19b2e47014d5c..4fd20e384aa2be2079814d42c403b0cab8558a3f 100644 (file)
@@ -41,7 +41,8 @@ radiant_plugin(bobtoolz
         visfind.cpp visfind.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(bobtoolz PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(bobtoolz PRIVATE uilib)
+target_link_libraries(bobtoolz PRIVATE uilib)
 
-target_link_libraries(bobtoolz mathlib)
+target_include_directories(bobtoolz PRIVATE mathlib)
+target_link_libraries(bobtoolz PRIVATE mathlib)
index 19c60d82e90e298c979f5182188655e7d0319113..578588d4aa77fe2b1d346807d235f394c26ebf63 100644 (file)
@@ -6,5 +6,5 @@ radiant_plugin(brushexport
         support.cpp support.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(brushexport PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(brushexport PRIVATE uilib)
+target_link_libraries(brushexport PRIVATE uilib)
index 344051f5a509e7afc048da15b8de267972b3a6fa..d7cf65d5d254cbcf7034c252fb1cc736f3c231ed 100644 (file)
@@ -6,5 +6,11 @@ radiant_plugin(prtview
         prtview.cpp prtview.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(prtview PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(prtview PRIVATE version)
+target_link_libraries(prtview PRIVATE version)
+
+target_include_directories(prtview PRIVATE uilib)
+target_link_libraries(prtview PRIVATE uilib)
+
+target_include_directories(prtview PRIVATE profile)
+target_link_libraries(prtview PRIVATE profile)
index 7fca280f2e609e579436f109c295b547f5da4667..08ccddc5eb47bbac9dc04ede20d7f7a3b72e02d1 100644 (file)
@@ -2,8 +2,8 @@ radiant_plugin(shaderplug
         shaderplug.cpp shaderplug.h
         )
 
-find_package(LibXml2 REQUIRED)
-target_include_directories(shaderplug PRIVATE ${LIBXML2_INCLUDE_DIR})
+target_include_directories(shaderplug PRIVATE xmllib)
+target_link_libraries(shaderplug PRIVATE xmllib)
 
-find_package(GTK2 REQUIRED)
-target_include_directories(shaderplug PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(shaderplug PRIVATE uilib)
+target_link_libraries(shaderplug PRIVATE uilib)
index 3a2b36f0667cb33d4b023bb10611c92fbb609c18..9def18191da16cd82cbe3d2cf2671960c1c5ea13 100644 (file)
@@ -2,5 +2,5 @@ radiant_plugin(sunplug
         sunplug.cpp sunplug.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(sunplug PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(sunplug PRIVATE uilib)
+target_link_libraries(sunplug PRIVATE uilib)
index a72db29ea71d32119e9c1ceb3cdf76a04a556169..5c96fdb10a1789b208036195ec4a7601fe290049 100644 (file)
@@ -5,5 +5,8 @@ radiant_plugin(ufoaiplug
         ufoai_level.cpp ufoai_level.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(ufoaiplug PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(ufoaiplug PRIVATE version)
+target_link_libraries(ufoaiplug PRIVATE version)
+
+target_include_directories(ufoaiplug PRIVATE uilib)
+target_link_libraries(ufoaiplug PRIVATE uilib)
index c5434fc8607f26ac1253fb05a5dc3938c67d6a73..d46362709caca1a4ecd2d7463f1443d1a8acc001 100644 (file)
@@ -63,3 +63,4 @@ add_library(libs
 
 find_package(GLIB REQUIRED)
 target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(libs PRIVATE ${GLIB_LIBRARIES})
index 4032653d808299ac4d6f13371eaa1356dabbf9ff..f01cf29c7b3962b7c069f911b6b7ea5336e66539 100644 (file)
@@ -24,8 +24,12 @@ add_library(gtkutil
         xorrectangle.h
         )
 
-find_package(GTK2 REQUIRED)
-target_include_directories(gtkutil PRIVATE ${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
+target_include_directories(gtkutil PRIVATE uilib)
+target_link_libraries(gtkutil PRIVATE uilib)
+
+target_include_directories(gtkutil PRIVATE ${GTK2_PANGO_INCLUDE_DIR})
+target_link_libraries(gtkutil PRIVATE ${GTK2_PANGO_LIBRARY})
 
 find_package(GtkGLExt REQUIRED)
 target_include_directories(gtkutil PRIVATE ${GTKGL_INCLUDE_DIRS})
+target_link_libraries(gtkutil PRIVATE ${GTKGL_LIBRARIES})
index f71111a8352b9d31f0e57baf54988a49d96de830..a0a19a843846403b010f218f51dd204fe8052b77 100644 (file)
@@ -10,5 +10,5 @@ endif ()
 add_library(l_net ${L_NETLIST})
 
 if (WIN32)
-    target_link_libraries(l_net ws2_32)
+    target_link_libraries(l_net PRIVATE ws2_32)
 endif ()
index cba5ec01e061e010757b7f60c480ffbb6e2d15ea..437b506caff6c7fc78251a80af0b1acdd5f61f5c 100644 (file)
@@ -7,3 +7,4 @@ add_library(os
 
 find_package(GLIB REQUIRED)
 target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(os PRIVATE ${GLIB_LIBRARIES})
index 4950c1e2749af22805bd331ef504382c289ccceb..fd9c938d13cf16664cc0eac8c36f3d31dcf9e007 100644 (file)
@@ -3,4 +3,8 @@ add_library(uilib
         )
 
 find_package(GTK2 REQUIRED)
-target_include_directories(uilib PRIVATE ${GTK2_INCLUDE_DIRS})
+target_include_directories(uilib PUBLIC ${GTK2_INCLUDE_DIRS})
+target_link_libraries(uilib PUBLIC ${GTK2_LIBRARIES})
+
+target_include_directories(uilib PUBLIC gtkutil)
+target_link_libraries(uilib PUBLIC gtkutil)
index 4fb6606a0457d04f12ed157ce93f97d43e020574..96e1e216fe43971c4a656d3794e9c27e287a3ff0 100644 (file)
@@ -8,7 +8,8 @@ add_library(xmllib
 
 find_package(GLIB REQUIRED)
 target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS})
+target_link_libraries(xmllib PUBLIC ${GLIB_LIBRARIES})
 
 find_package(LibXml2 REQUIRED)
 target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR})
-target_link_libraries(xmllib ${LIBXML2_LIBRARIES})
+target_link_libraries(xmllib PUBLIC ${LIBXML2_LIBRARIES})
index 026b1aa77f4e3dd64230501cfe249949c6a10aa8..7ed025d8078d768274a074bfc33a9f3724b0dbc4 100644 (file)
@@ -7,3 +7,4 @@ radiant_plugin(archivezip
 
 find_package(ZLIB REQUIRED)
 target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS})
+target_link_libraries(archivezip PRIVATE ${ZLIB_LIBRARIES})
index b5114d9fa07123be1ccf241e135e2a3a64d6b362..e1f40cc51747fbf6aaaa992af1b0470b21388fd0 100644 (file)
@@ -10,4 +10,4 @@ radiant_plugin(image
 
 find_package(JPEG REQUIRED)
 target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR})
-target_link_libraries(image ddslib etclib ${JPEG_LIBRARIES})
+target_link_libraries(image PRIVATE ddslib etclib ${JPEG_LIBRARIES})
index 45da9433b0083773f4d8b169e096f41e7f7b1193..a9c6993136d0c1db2f6327e9e9a7342d3ace63a2 100644 (file)
@@ -4,3 +4,4 @@ radiant_plugin(imagepng
 
 find_package(PNG REQUIRED)
 target_include_directories(imagepng PRIVATE ${PNG_INCLUDE_DIR})
+target_link_libraries(imagepng PRIVATE ${PNG_LIBRARIES})
index 800e31fcc889c9cab905225e82335d730c41f197..a6aae15f766b05cb6196e13e0499fe25c3be2e92 100644 (file)
@@ -4,4 +4,5 @@ radiant_plugin(mapxml
         xmlwrite.cpp xmlwrite.h
         )
 
-target_link_libraries(mapxml xmllib)
+target_include_directories(mapxml PRIVATE xmllib)
+target_link_libraries(mapxml PRIVATE xmllib)
index bf55e1ff71cc6f93dba863e8cef0adc272938168..4a23e28d2131ad28cbdb98fe891c83d34ff02053 100644 (file)
@@ -3,4 +3,5 @@ radiant_plugin(model
         plugin.cpp
         )
 
-target_link_libraries(model picomodel)
+target_include_directories(model PRIVATE picomodel)
+target_link_libraries(model PRIVATE picomodel)
index 9c4b38cc81b57fc7420095c8abe44deca3f086cf..b565c0ac1772a466cd58122f4ac703aaabb9ea05 100644 (file)
@@ -5,3 +5,4 @@ radiant_plugin(shaders
 
 find_package(GLIB REQUIRED)
 target_include_directories(shaders PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(shaders PRIVATE ${GLIB_LIBRARIES})
index 5591c5981c533d79a0d27a0423392c634c0ed771..a55e9de05ba159c44918d5ea2bc716d0575b1026 100644 (file)
@@ -6,5 +6,7 @@ radiant_plugin(vfspk3
 
 find_package(GLIB REQUIRED)
 target_include_directories(vfspk3 PRIVATE ${GLIB_INCLUDE_DIRS})
+target_link_libraries(vfspk3 PRIVATE ${GLIB_LIBRARIES})
 
-target_link_libraries(vfspk3 filematch)
+target_include_directories(vfspk3 PRIVATE filematch)
+target_link_libraries(vfspk3 PRIVATE filematch)
index b0032207d175cc5168e3a45a10690654b95034a4..8b704e7bb6020113e156fd2a8c2a9327b501dcf3 100644 (file)
@@ -1,16 +1,7 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
 
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
-
-find_package(GTK2 REQUIRED)
-include_directories(${GTK2_INCLUDE_DIRS} ${GTK2_GDK_INCLUDE_DIR} ${GTK2_GLIB_INCLUDE_DIR})
-
 find_package(OpenGL REQUIRED)
 
-find_package(GtkGLExt REQUIRED)
-include_directories(${GTKGL_INCLUDE_DIRS})
-
 include_directories("${CMAKE_SOURCE_DIR}/libs")
 include_directories("${CMAKE_SOURCE_DIR}/include")
 
@@ -180,7 +171,6 @@ set(RADIANTLIST
     xmlstuff.h
     xywindow.cpp
     xywindow.h
-    "${CMAKE_BINARY_DIR}/version.cpp"
 )
 
 add_executable(radiant WIN32 radiant.rc ${RADIANTLIST})
@@ -188,9 +178,8 @@ target_link_libraries(radiant
     ${CMAKE_DL_LIBS}
     ${LIBXML2_LIBRARIES}
     ${OPENGL_gl_LIBRARY}
-    ${GTK2_LIBRARIES}
-    ${GTK2_PANGO_LIBRARY}
     ${GTKGL_LIBRARIES}
+    version
     includes
     cmdlib
     container
@@ -199,7 +188,6 @@ target_link_libraries(radiant
     etclib
     filematch
     generic
-    gtkutil
     l_net
     math
     mathlib