Skip to content

Commit

Permalink
add linux settings
Browse files Browse the repository at this point in the history
  • Loading branch information
insinfo committed Mar 3, 2022
1 parent cf4ffd0 commit 9798cc0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ set(FREETYPE_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/FreeType/include")

include(cmake-config.txt)

#isaque alterou aqui
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fvisibility=hidden")
#export CFLAGS="-fPIC -fvisibility=hidden" export CXXFLAGS="-fPIC -fvisibility=hidden"
message(WARNING "CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}")

add_subdirectory(goo)
add_subdirectory(fofi)
add_subdirectory(splash)
Expand Down
5 changes: 4 additions & 1 deletion cmake-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
if (CYGWIN)
set(PIC_FLAG "")
elseif (CMAKE_HOST_SYSTEM_NAME MATCHES "AIX")
set(PIC_FLAG "-qPIC")
set(PIC_FLAG "-fPIC") #isaque alterou de -qPIC para -fPIC
else ()
set(PIC_FLAG "-fPIC")
endif ()

set(CMAKE_C_FLAGS_DEBUG "-g -O -Wall ${PIC_FLAG}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O -Wall ${PIC_FLAG}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -O -Wall ${PIC_FLAG}")
Expand All @@ -53,6 +54,8 @@ if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
CMAKE_EXE_LINKER_FLAGS_PROFILING)
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
"Choose build mode - options are: None Debug Release RelWithDebInfo MinSizeRel Profiling")


endif ()

#--- set default C/C++ compiler flags for Windows
Expand Down
4 changes: 2 additions & 2 deletions xpdf/Lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ int getNumPages(char* fileName, void (*logCallback)(const char*), const char* ow
}


int main(int argc, char* argv[]) {
/*int main(int argc, char* argv[]) {
printf("inicio \r\n");
char* fileName = "C:/MyDartProjects/riodasostras/pdf_text_extraction/downloads/3883f913-9d81-49f4-ae16-da448091c18c.pdf";
// char* outFileName = "C:/MyDartProjects/riodasostras/pdf_text_extraction/out.txt";
Expand All @@ -363,4 +363,4 @@ int main(int argc, char* argv[]) {
printf("getNumPages %d \r\n", numPages);
delete[] textOutput;
}
}*/

0 comments on commit 9798cc0

Please sign in to comment.