aboutsummaryrefslogtreecommitdiff
path: root/src/tools/map_extractor
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-03-14 15:45:39 +0100
committerNaios <naios-dev@live.de>2016-03-19 23:19:52 +0100
commit0db4f018e8df1a44d2657ca21e2e47038c1aab06 (patch)
tree3924892183a3c06b7a98bd76f35e3a153d1d3ffb /src/tools/map_extractor
parent853eee75b0f36b7d26262df50ba477d8ab96dfe6 (diff)
CMake: Use inherited dependencies in common and tools
(cherry picked from commit abda7a910a760687f9c1b9e0893314e04982c0f1)
Diffstat (limited to 'src/tools/map_extractor')
-rw-r--r--src/tools/map_extractor/CMakeLists.txt46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt
index 25ad7c771e8..656bee3d5a0 100644
--- a/src/tools/map_extractor/CMakeLists.txt
+++ b/src/tools/map_extractor/CMakeLists.txt
@@ -9,34 +9,38 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-file(GLOB_RECURSE sources *.cpp *.h)
-
-include_directories (
- ${CMAKE_SOURCE_DIR}/dep/CascLib/src
- ${CMAKE_SOURCE_DIR}/dep/cppformat
- ${CMAKE_SOURCE_DIR}/src/common
- ${CMAKE_SOURCE_DIR}/src/common/Utilities
- ${CMAKE_SOURCE_DIR}/src/server/shared
+CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/loadlib
-)
-
-include_directories(${include_Dirs})
+ PRIVATE_SOURCES)
add_executable(mapextractor
- ${sources}
+ ${PRIVATE_SOURCES}
)
+target_include_directories(mapextractor
+ PUBLIC
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/loadlib)
+
target_link_libraries(mapextractor
- casc
- common
- cppformat
- ${BZIP2_LIBRARIES}
- ${ZLIB_LIBRARIES}
- ${Boost_LIBRARIES}
-)
+ PUBLIC
+ common
+ casc)
+
+CollectIncludeDirectories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ PUBLIC_INCLUDES)
+
+target_include_directories(mapextractor
+ PUBLIC
+ ${PUBLIC_INCLUDES}
+ PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR})
-add_dependencies(mapextractor casc)
+set_target_properties(mapextractor
+ PROPERTIES
+ FOLDER
+ "tools")
if( UNIX )
install(TARGETS mapextractor DESTINATION bin)