-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from uilianries/apriltag-311
Force C99
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b97f24e..ff4af67 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -10,7 +10,8 @@ aux_source_directory(. APRILTAG_SRCS) | ||
set(CMAKE_BUILD_TYPE Release) | ||
|
||
# Library | ||
-add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC}) | ||
+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC}) | ||
+set_target_properties(${PROJECT_NAME} PROPERTIES C_STANDARD 99) | ||
if (MSVC) | ||
# FindThreads will not find pthread.h with MSVC | ||
# winmm is necessary for __imp_timeGetTime | ||
@@ -34,7 +35,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES | ||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR} | ||
) | ||
|
||
-file(GLOB TAG_FILES ${CMAKE_SOURCE_DIR}/tag*.c) | ||
+file(GLOB TAG_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tag*.c) | ||
set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) | ||
|
||
# install library | ||
@@ -44,7 +45,7 @@ install(TARGETS ${PROJECT_NAME} EXPORT apriltag | ||
) | ||
|
||
# install header file hierarchy | ||
-file(GLOB_RECURSE HEADER_FILES RELATIVE ${CMAKE_SOURCE_DIR} *.h) | ||
+file(GLOB_RECURSE HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) | ||
foreach(HEADER ${HEADER_FILES}) | ||
string(REGEX MATCH "(.*)[/\\]" DIR ${HEADER}) | ||
install(FILES ${HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${DIR}) |