Add config.h.in which produces the config.h on CMake configure.
This commit is contained in:
+10
-7
@@ -5,6 +5,11 @@ if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
|
||||
)
|
||||
|
||||
# Adhere to GNU filesystem layout conventions.
|
||||
include(GNUInstallDirs)
|
||||
|
||||
@@ -102,10 +107,8 @@ set(TARGET webcc)
|
||||
|
||||
add_library(${TARGET} STATIC ${HEADERS} ${SOURCES})
|
||||
|
||||
if(WEBCC_ENABLE_INSTALL)
|
||||
# Install lib and header files.
|
||||
# On Linux, if CMAKE_INSTALL_PREFIX is ~, the lib (libwebcc.a) will be installed
|
||||
# to ~/lib and header files will be installed to ~/include.
|
||||
install(TARGETS ${TARGET} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webcc)
|
||||
endif()
|
||||
# Install lib and header files.
|
||||
# On Linux, if CMAKE_INSTALL_PREFIX is ~, the lib (libwebcc.a) will be installed
|
||||
# to ~/lib and header files will be installed to ~/include.
|
||||
install(TARGETS ${TARGET} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webcc)
|
||||
|
||||
Reference in New Issue
Block a user