Buildsystem: Ensure that we're on a Windows-platform if attempting to load Windows-specific includefiles
(Why the hoot can't Microsoft use the same things as the rest of the world, and stick to standards!?) --HG-- branch : trunk
This commit is contained in:
Vendored
+14
-6
@@ -14,12 +14,20 @@ set(mpq_STAT_SRCS
|
|||||||
${sources_mpq}
|
${sources_mpq}
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
if( UNIX )
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/win
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/externals/zlib
|
${CMAKE_SOURCE_DIR}/externals/zlib
|
||||||
${CMAKE_SOURCE_DIR}/externals/bzip2
|
${CMAKE_SOURCE_DIR}/externals/bzip2
|
||||||
)
|
)
|
||||||
|
elseif( WIN32 )
|
||||||
|
include_directories(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/win
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/zlib
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/bzip2
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(mpq STATIC ${mpq_STAT_SRCS})
|
add_library(mpq STATIC ${mpq_STAT_SRCS})
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,22 @@
|
|||||||
|
|
||||||
file(GLOB_RECURSE sources *.cpp *.h)
|
file(GLOB_RECURSE sources *.cpp *.h)
|
||||||
|
|
||||||
include_directories (
|
if( UNIX )
|
||||||
${CMAKE_SOURCE_DIR}/src/server/shared
|
include_directories (
|
||||||
${CMAKE_SOURCE_DIR}/externals/libmpq
|
${CMAKE_SOURCE_DIR}/src/server/shared
|
||||||
${CMAKE_SOURCE_DIR}/externals/libmpq/win
|
${CMAKE_SOURCE_DIR}/externals/libmpq
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/loadlib
|
${CMAKE_CURRENT_SOURCE_DIR}/loadlib
|
||||||
)
|
)
|
||||||
|
elseif( WIN32 )
|
||||||
|
include_directories (
|
||||||
|
${CMAKE_SOURCE_DIR}/src/server/shared
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/libmpq
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/libmpq/win
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/loadlib
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(mapextractor
|
add_executable(mapextractor
|
||||||
${sources}
|
${sources}
|
||||||
|
|||||||
@@ -20,10 +20,16 @@ add_definitions("-Wall")
|
|||||||
add_definitions("-ggdb")
|
add_definitions("-ggdb")
|
||||||
add_definitions("-O3")
|
add_definitions("-O3")
|
||||||
|
|
||||||
include_directories(
|
if( UNIX )
|
||||||
${CMAKE_SOURCE_DIR}/externals/libmpq
|
include_directories(
|
||||||
${CMAKE_SOURCE_DIR}/externals/libmpq/win
|
${CMAKE_SOURCE_DIR}/externals/libmpq
|
||||||
)
|
)
|
||||||
|
elseif( WIN32 )
|
||||||
|
include_directories(
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/libmpq
|
||||||
|
${CMAKE_SOURCE_DIR}/externals/libmpq/win
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(vmap3extractor ${sources})
|
add_executable(vmap3extractor ${sources})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user