Improve resolving ROOT_DIR
This commit is contained in:
parent
11881e4dd7
commit
8013c86c7d
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
PROJECT(zstd)
|
PROJECT(zstd)
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
|
||||||
|
SET(ZSTD_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../..")
|
||||||
|
|
||||||
OPTION(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
|
OPTION(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
|
||||||
OPTION(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ON)
|
OPTION(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ON)
|
||||||
|
@ -14,13 +14,10 @@ PROJECT(pzstd)
|
|||||||
|
|
||||||
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||||
|
|
||||||
# Define project root directory
|
|
||||||
SET(ROOT_DIR ../../../..)
|
|
||||||
|
|
||||||
# Define programs directory, where sources and header files are located
|
# Define programs directory, where sources and header files are located
|
||||||
SET(LIBRARY_DIR ${ROOT_DIR}/lib)
|
SET(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
|
||||||
SET(PROGRAMS_DIR ${ROOT_DIR}/programs)
|
SET(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs)
|
||||||
SET(PZSTD_DIR ${ROOT_DIR}/contrib/pzstd)
|
SET(PZSTD_DIR ${ZSTD_SOURCE_DIR}/contrib/pzstd)
|
||||||
INCLUDE_DIRECTORIES(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${PZSTD_DIR})
|
INCLUDE_DIRECTORIES(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${PZSTD_DIR})
|
||||||
|
|
||||||
ADD_EXECUTABLE(pzstd ${PZSTD_DIR}/main.cpp ${PZSTD_DIR}/Options.cpp ${PZSTD_DIR}/Pzstd.cpp ${PZSTD_DIR}/SkippableFrame.cpp)
|
ADD_EXECUTABLE(pzstd ${PZSTD_DIR}/main.cpp ${PZSTD_DIR}/Options.cpp ${PZSTD_DIR}/Pzstd.cpp ${PZSTD_DIR}/SkippableFrame.cpp)
|
||||||
|
@ -22,11 +22,8 @@ PROJECT(libzstd)
|
|||||||
|
|
||||||
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||||
|
|
||||||
# Define project root directory
|
|
||||||
SET(ROOT_DIR ../../..)
|
|
||||||
|
|
||||||
# Define library directory, where sources and header files are located
|
# Define library directory, where sources and header files are located
|
||||||
SET(LIBRARY_DIR ${ROOT_DIR}/lib)
|
SET(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
|
||||||
INCLUDE_DIRECTORIES(${LIBRARY_DIR} ${LIBRARY_DIR}/common)
|
INCLUDE_DIRECTORIES(${LIBRARY_DIR} ${LIBRARY_DIR}/common)
|
||||||
|
|
||||||
# Read file content
|
# Read file content
|
||||||
@ -97,7 +94,7 @@ IF (ZSTD_LEGACY_SUPPORT)
|
|||||||
ENDIF (ZSTD_LEGACY_SUPPORT)
|
ENDIF (ZSTD_LEGACY_SUPPORT)
|
||||||
|
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
SET(MSVC_RESOURCE_DIR ${ROOT_DIR}/build/VS2010/libzstd-dll)
|
SET(MSVC_RESOURCE_DIR ${ZSTD_SOURCE_DIR}/build/VS2010/libzstd-dll)
|
||||||
SET(PlatformDependResources ${MSVC_RESOURCE_DIR}/libzstd-dll.rc)
|
SET(PlatformDependResources ${MSVC_RESOURCE_DIR}/libzstd-dll.rc)
|
||||||
ENDIF (MSVC)
|
ENDIF (MSVC)
|
||||||
|
|
||||||
|
@ -14,12 +14,9 @@ PROJECT(programs)
|
|||||||
|
|
||||||
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||||
|
|
||||||
# Define project root directory
|
|
||||||
SET(ROOT_DIR ../../..)
|
|
||||||
|
|
||||||
# Define programs directory, where sources and header files are located
|
# Define programs directory, where sources and header files are located
|
||||||
SET(LIBRARY_DIR ${ROOT_DIR}/lib)
|
SET(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
|
||||||
SET(PROGRAMS_DIR ${ROOT_DIR}/programs)
|
SET(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs)
|
||||||
INCLUDE_DIRECTORIES(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder)
|
INCLUDE_DIRECTORIES(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder)
|
||||||
|
|
||||||
IF (ZSTD_LEGACY_SUPPORT)
|
IF (ZSTD_LEGACY_SUPPORT)
|
||||||
@ -28,7 +25,7 @@ IF (ZSTD_LEGACY_SUPPORT)
|
|||||||
ENDIF (ZSTD_LEGACY_SUPPORT)
|
ENDIF (ZSTD_LEGACY_SUPPORT)
|
||||||
|
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
SET(MSVC_RESOURCE_DIR ${ROOT_DIR}/build/VS2010/zstd)
|
SET(MSVC_RESOURCE_DIR ${ZSTD_SOURCE_DIR}/build/VS2010/zstd)
|
||||||
SET(PlatformDependResources ${MSVC_RESOURCE_DIR}/zstd.rc)
|
SET(PlatformDependResources ${MSVC_RESOURCE_DIR}/zstd.rc)
|
||||||
ENDIF (MSVC)
|
ENDIF (MSVC)
|
||||||
|
|
||||||
|
@ -34,13 +34,10 @@ PROJECT(tests)
|
|||||||
|
|
||||||
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||||
|
|
||||||
# Define project root directory
|
|
||||||
SET(ROOT_DIR ../../..)
|
|
||||||
|
|
||||||
# Define programs directory, where sources and header files are located
|
# Define programs directory, where sources and header files are located
|
||||||
SET(LIBRARY_DIR ${ROOT_DIR}/lib)
|
SET(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
|
||||||
SET(PROGRAMS_DIR ${ROOT_DIR}/programs)
|
SET(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs)
|
||||||
SET(TESTS_DIR ${ROOT_DIR}/tests)
|
SET(TESTS_DIR ${ZSTD_SOURCE_DIR}/tests)
|
||||||
INCLUDE_DIRECTORIES(${TESTS_DIR} ${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder)
|
INCLUDE_DIRECTORIES(${TESTS_DIR} ${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder)
|
||||||
|
|
||||||
ADD_EXECUTABLE(fullbench ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/fullbench.c)
|
ADD_EXECUTABLE(fullbench ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/fullbench.c)
|
||||||
|
Loading…
Reference in New Issue
Block a user