mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-12-25 17:49:52 +03:00
CMake: set PDB output directory, don't set default build type
This commit is contained in:
parent
25c99a7e04
commit
e1bd84d7f3
@ -5,7 +5,13 @@ project(SoftEtherVPN
|
||||
LANGUAGES C
|
||||
)
|
||||
|
||||
set(default_build_type "Release")
|
||||
# We define a dedicated variable because CMAKE_BUILD_TYPE can have different
|
||||
# configurations than "Debug" and "Release", such as "RelWithDebInfo".
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(BUILD_TYPE "Debug")
|
||||
else()
|
||||
set(BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# Check that submodules are present only if source was downloaded with git
|
||||
if(EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURCE_DIR}/src/Mayaqua/3rdparty/cpu_features/CMakeLists.txt")
|
||||
|
@ -16,11 +16,9 @@ if(UNIX)
|
||||
endmacro(install_wrapper_script)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
if(BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions(-D_DEBUG -DDEBUG)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
else()
|
||||
add_definitions(-DNDEBUG -DVPN_SPEED)
|
||||
endif()
|
||||
|
||||
|
@ -20,6 +20,12 @@ set_target_properties(cedar
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(cedar
|
||||
PROPERTIES
|
||||
COMPILE_PDB_NAME "cedar"
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
target_include_directories(cedar PRIVATE winpcap)
|
||||
endif()
|
||||
|
||||
|
@ -17,6 +17,12 @@ set_target_properties(mayaqua
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(mayaqua
|
||||
PROPERTIES
|
||||
COMPILE_PDB_NAME "mayaqua"
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
add_subdirectory(3rdparty/zlib)
|
||||
|
||||
target_include_directories(mayaqua PRIVATE win32_inc)
|
||||
@ -25,22 +31,22 @@ if(WIN32)
|
||||
if(${COMPILER_ARCHITECTURE} STREQUAL "x64")
|
||||
find_library(LIB_SSL
|
||||
NAMES libssl ssleay32
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${CMAKE_BUILD_TYPE}"
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
|
||||
)
|
||||
|
||||
find_library(LIB_CRYPTO
|
||||
NAMES libcrypto libeay32
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${CMAKE_BUILD_TYPE}"
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/x64_${BUILD_TYPE}"
|
||||
)
|
||||
else()
|
||||
find_library(LIB_SSL
|
||||
NAMES libssl ssleay32
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${CMAKE_BUILD_TYPE}"
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
|
||||
)
|
||||
|
||||
find_library(LIB_CRYPTO
|
||||
NAMES libcrypto libeay32
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${CMAKE_BUILD_TYPE}"
|
||||
HINTS "${CMAKE_SOURCE_DIR}/src/BuildFiles/Library/vs2017/Win32_${BUILD_TYPE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -9,6 +9,7 @@ set_target_properties(PenCore
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/bin/hamcore"
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
target_link_libraries(PenCore cedar mayaqua)
|
||||
|
@ -7,4 +7,11 @@ set_target_properties(hamcorebuilder
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(hamcorebuilder
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/tmp"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(hamcorebuilder cedar mayaqua)
|
||||
|
@ -13,6 +13,13 @@ set_target_properties(vpnbridge
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vpnbridge
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vpnbridge cedar mayaqua)
|
||||
|
||||
if(UNIX)
|
||||
|
@ -13,6 +13,13 @@ set_target_properties(vpnclient
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vpnclient
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vpnclient cedar mayaqua)
|
||||
|
||||
if(UNIX)
|
||||
|
@ -13,6 +13,13 @@ set_target_properties(vpncmd
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vpncmd
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vpncmd cedar mayaqua)
|
||||
|
||||
if(UNIX)
|
||||
|
@ -17,6 +17,7 @@ set_target_properties(vpncmgr
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
target_link_libraries(vpncmgr cedar mayaqua)
|
||||
|
@ -13,6 +13,13 @@ set_target_properties(vpnserver
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vpnserver
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vpnserver cedar mayaqua)
|
||||
|
||||
if(UNIX)
|
||||
|
@ -17,6 +17,7 @@ set_target_properties(vpnsmgr
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
target_link_libraries(vpnsmgr cedar mayaqua)
|
||||
|
@ -17,4 +17,11 @@ set_target_properties(vpntest
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vpntest
|
||||
PROPERTIES
|
||||
PDB_OUTPUT_DIRECTORY "${BUILD_DIRECTORY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vpntest cedar mayaqua)
|
||||
|
Loading…
Reference in New Issue
Block a user